library("grid")
library("ggplot2")
library("gplots")
##
## Attaching package: 'gplots'
## The following object is masked from 'package:stats':
##
## lowess
library("ggcorrplot")
library("gridExtra")
library("viridis")
## Loading required package: viridisLite
library("reshape2")
library("gridExtra")
library("RColorBrewer")
library("scales")
##
## Attaching package: 'scales'
## The following object is masked from 'package:viridis':
##
## viridis_pal
library("stringr")
library("rstatix")
##
## Attaching package: 'rstatix'
## The following object is masked from 'package:ggcorrplot':
##
## cor_pmat
## The following object is masked from 'package:stats':
##
## filter
library("dplyr")
##
## Attaching package: 'dplyr'
## The following object is masked from 'package:gridExtra':
##
## combine
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library("tidyr")
##
## Attaching package: 'tidyr'
## The following object is masked from 'package:reshape2':
##
## smiths
source('./COVIDvaccines_PlottingFunctions.R')
##
## Attaching package: 'MASS'
## The following object is masked from 'package:dplyr':
##
## select
## The following object is masked from 'package:rstatix':
##
## select
sessionInfo()
## R version 4.0.2 (2020-06-22)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 10 x64 (build 18362)
##
## Matrix products: default
##
## locale:
## [1] LC_COLLATE=English_United States.1252
## [2] LC_CTYPE=English_United States.1252
## [3] LC_MONETARY=English_United States.1252
## [4] LC_NUMERIC=C
## [5] LC_TIME=English_United States.1252
##
## attached base packages:
## [1] grid stats graphics grDevices utils datasets methods
## [8] base
##
## other attached packages:
## [1] e1071_1.7-3 pheatmap_1.0.12 ggrepel_0.8.2 MASS_7.3-51.6
## [5] tidyr_1.1.1 dplyr_1.0.2 rstatix_0.6.0 stringr_1.4.0
## [9] scales_1.1.1 RColorBrewer_1.1-2 reshape2_1.4.4 viridis_0.5.1
## [13] viridisLite_0.3.0 gridExtra_2.3 ggcorrplot_0.1.3 gplots_3.0.4
## [17] ggplot2_3.3.2
##
## loaded via a namespace (and not attached):
## [1] gtools_3.8.2 tidyselect_1.1.0 xfun_0.15 purrr_0.3.4
## [5] haven_2.3.1 carData_3.0-4 colorspace_1.4-1 vctrs_0.3.2
## [9] generics_0.0.2 htmltools_0.5.0 yaml_2.2.1 rlang_0.4.7
## [13] pillar_1.4.6 foreign_0.8-80 glue_1.4.1 withr_2.2.0
## [17] readxl_1.3.1 lifecycle_0.2.0 plyr_1.8.6 cellranger_1.1.0
## [21] munsell_0.5.0 gtable_0.3.0 zip_2.1.0 caTools_1.18.0
## [25] evaluate_0.14 knitr_1.29 rio_0.5.16 forcats_0.5.0
## [29] class_7.3-17 curl_4.3 highr_0.8 broom_0.7.0
## [33] Rcpp_1.0.5 KernSmooth_2.23-17 backports_1.1.9 gdata_2.18.0
## [37] abind_1.4-5 hms_0.5.3 digest_0.6.25 stringi_1.4.6
## [41] openxlsx_4.1.5 tools_4.0.2 bitops_1.0-6 magrittr_1.5
## [45] tibble_3.0.3 crayon_1.3.4 car_3.0-9 pkgconfig_2.0.3
## [49] ellipsis_0.3.1 data.table_1.13.0 rmarkdown_2.7 R6_2.4.1
## [53] compiler_4.0.2
knitr::opts_chunk$set(fig.width=12, fig.height=8)
mergedData <- readRDS(file = "mergedData.Rds")
demog.melt <- readRDS(file = "demog.melt.Rds")
# colors: COVID-exp B5B2F1 (purple) COVID-naive FFDFB1 (orange)
—————— Cohort description ————————–
# ggplot(demog, aes(x = "", y=Vaccine.Type, fill=Vaccine.Type)) + geom_bar(stat='identity') + coord_polar("y",start=0) + theme_void() + scale_fill_brewer(palette = "Set1")
# ggsave(filename = "Images/VaccineTypes.pdf")
temp <- mergedData
temp$timeCategory <- factor(temp$timeCategory, levels = c("Baseline", "Post 1st dose", "two Weeks", "Pre 2nd dose", "Post 2nd dose",
"One month post\n2nd dose", "Four months post\n2nd dose"))
temp <- temp[! is.na(temp$timeCategory), ]
temp <- temp[-which(temp$Alias == "PHI-077" | temp$Alias == "PHI-054" | temp$Alias =="PHI-075" | temp$Alias =="HV-095" ), ]
temp$Record.ID <- factor(temp$Record.ID)
a <- ggplot(data = temp, aes(x = DPV, y = Record.ID, group = Record.ID)) + geom_vline(xintercept = 0, linetype = "dashed", alpha=0.5) + geom_path() +
geom_point(aes(fill = timeCategory, shape = timeCategory), size=4) + theme_bw() + ggtitle("Cohort overview") + xlab("Days relative to vaccine dose 1") + ylab("") +
scale_shape_manual(values=c(20:25,16)) + scale_fill_viridis_d() +
theme(axis.text = element_text(color="black",size=16, angle=45, hjust = 1, vjust=0), plot.title = element_text(color="black",size=24), axis.text.y = element_blank(),
legend.text = element_text(size=16), legend.title = element_blank(), axis.title = element_text(color="black", size=16)) +
scale_y_discrete(limits = rev(levels(temp$Record.ID)))+
scale_x_continuous( breaks = seq(-100,200,20))
a
## Warning: Removed 2 row(s) containing missing values (geom_path).
## Warning: Removed 2 rows containing missing values (geom_point).
# ggsave(filename = "Images/FullCohort_overview.pdf", width=7)
# plotly::ggplotly(a)
—————— First x subjects and no longitudinal ————————–
#
# if("PHI-046" %in% mergedData$Alias) {mergedData <- mergedData[-which(mergedData$Alias == "PHI-046"),] } # only Moderna recipient, will temporarily exclude
# if("HV-083" %in% mergedData$Alias) {mergedData <- mergedData[-which(mergedData$Alias == "HV-083"),] } # exclude due to active COVID at time of vaccination so uncertain cohort
# if("HV-089" %in% mergedData$Alias) {mergedData <- mergedData[-which(mergedData$Alias == "HV-089"),] } # transplant patient who was already fully vaccinated at enrollment
# if("PHI-077" %in% mergedData$Alias) {mergedData <- mergedData[-which(mergedData$Alias == "PHI-077"),] } # already fully vaccinated at enrollment
keepList <- paste0("CV-",sprintf("%03d", seq(1,43,1)))
keepList <- keepList[-which(keepList == "CV-013" | # developed COVID shortly after 1st vaccination so unclear status
keepList == "CV-031" | # received Moderna
keepList == "CV-038" | # fully vax transplant patient at enrollment
keepList == "CV-040" | # enrolled late so don't have recent baseline or post 1st dose
keepList == "CV-041" | # incomplete timecourse, vax date 2 unknown and lost to followup?
keepList == "CV-042")] # received Moderna
mergedData <- mergedData[ mergedData$Record.ID %in% keepList, ]
temp <- mergedData[which(mergedData$Record.ID %in% keepList),] %>% group_by(Prior.COVID.infection., timeCategory) %>% get_summary_stats(type = 'common')
## Warning: Problem with `mutate()` input `data`.
## i Problem with `mutate()` input `ci`.
## i NaNs produced
## i Input `ci` is `abs(stats::qt(alpha/2, .data$n - 1) * .data$se)`.
## i Input `data` is `map(.data$data, .f, ...)`.
## Warning: Problem with `mutate()` input `ci`.
## i NaNs produced
## i Input `ci` is `abs(stats::qt(alpha/2, .data$n - 1) * .data$se)`.
## Warning: Problem with `mutate()` input `data`.
## i NaNs produced
## i Input `data` is `map(.data$data, .f, ...)`.
## Warning in stats::qt(alpha/2, .data$n - 1): NaNs produced
## Warning: Problem with `mutate()` input `data`.
## i Problem with `mutate()` input `ci`.
## i NaNs produced
## i Input `ci` is `abs(stats::qt(alpha/2, .data$n - 1) * .data$se)`.
## i Input `data` is `map(.data$data, .f, ...)`.
## Warning: Problem with `mutate()` input `ci`.
## i NaNs produced
## i Input `ci` is `abs(stats::qt(alpha/2, .data$n - 1) * .data$se)`.
## Warning: Problem with `mutate()` input `data`.
## i NaNs produced
## i Input `data` is `map(.data$data, .f, ...)`.
## Warning in stats::qt(alpha/2, .data$n - 1): NaNs produced
## Warning: Problem with `mutate()` input `data`.
## i Problem with `mutate()` input `ci`.
## i NaNs produced
## i Input `ci` is `abs(stats::qt(alpha/2, .data$n - 1) * .data$se)`.
## i Input `data` is `map(.data$data, .f, ...)`.
## Warning: Problem with `mutate()` input `ci`.
## i NaNs produced
## i Input `ci` is `abs(stats::qt(alpha/2, .data$n - 1) * .data$se)`.
## Warning: Problem with `mutate()` input `data`.
## i NaNs produced
## i Input `data` is `map(.data$data, .f, ...)`.
## Warning in stats::qt(alpha/2, .data$n - 1): NaNs produced
## Warning: Problem with `mutate()` input `data`.
## i Problem with `mutate()` input `ci`.
## i NaNs produced
## i Input `ci` is `abs(stats::qt(alpha/2, .data$n - 1) * .data$se)`.
## i Input `data` is `map(.data$data, .f, ...)`.
## Warning: Problem with `mutate()` input `ci`.
## i NaNs produced
## i Input `ci` is `abs(stats::qt(alpha/2, .data$n - 1) * .data$se)`.
## Warning: Problem with `mutate()` input `data`.
## i NaNs produced
## i Input `data` is `map(.data$data, .f, ...)`.
## Warning in stats::qt(alpha/2, .data$n - 1): NaNs produced
## Warning: Problem with `mutate()` input `data`.
## i Problem with `mutate()` input `ci`.
## i NaNs produced
## i Input `ci` is `abs(stats::qt(alpha/2, .data$n - 1) * .data$se)`.
## i Input `data` is `map(.data$data, .f, ...)`.
## Warning: Problem with `mutate()` input `ci`.
## i NaNs produced
## i Input `ci` is `abs(stats::qt(alpha/2, .data$n - 1) * .data$se)`.
## Warning: Problem with `mutate()` input `data`.
## i NaNs produced
## i Input `data` is `map(.data$data, .f, ...)`.
## Warning in stats::qt(alpha/2, .data$n - 1): NaNs produced
## Warning: Problem with `mutate()` input `data`.
## i Problem with `mutate()` input `ci`.
## i NaNs produced
## i Input `ci` is `abs(stats::qt(alpha/2, .data$n - 1) * .data$se)`.
## i Input `data` is `map(.data$data, .f, ...)`.
## Warning: Problem with `mutate()` input `ci`.
## i NaNs produced
## i Input `ci` is `abs(stats::qt(alpha/2, .data$n - 1) * .data$se)`.
## Warning: Problem with `mutate()` input `data`.
## i NaNs produced
## i Input `data` is `map(.data$data, .f, ...)`.
## Warning in stats::qt(alpha/2, .data$n - 1): NaNs produced
## Warning: Problem with `mutate()` input `data`.
## i Problem with `mutate()` input `ci`.
## i NaNs produced
## i Input `ci` is `abs(stats::qt(alpha/2, .data$n - 1) * .data$se)`.
## i Input `data` is `map(.data$data, .f, ...)`.
## Warning: Problem with `mutate()` input `ci`.
## i NaNs produced
## i Input `ci` is `abs(stats::qt(alpha/2, .data$n - 1) * .data$se)`.
## Warning: Problem with `mutate()` input `data`.
## i NaNs produced
## i Input `data` is `map(.data$data, .f, ...)`.
## Warning in stats::qt(alpha/2, .data$n - 1): NaNs produced
# write.csv(temp, file = "summaryStatistics.csv")
subsetData <- subset(mergedData, timeCategory == "Baseline")
table(subsetData$Prior.COVID.infection., subsetData$Sex)
##
## Female Male
## No 10 11
## Yes 10 5
table(subsetData$Prior.COVID.infection., subsetData$Race)
##
## Asian Black or African-American Caucasian
## No 4 1 16
## Yes 2 0 13
median(subsetData$DPO.covid, na.rm=T)
## [1] -282
range(subsetData$DPO.covid, na.rm=T)
## [1] -359 78
temp <- mergedData[which(mergedData$Record.ID %in% keepList), ]
temp <- temp[-which(temp$timeCategory == "2 wks Post 2nd dose" | temp$timeCategory == "" | temp$shortForm == "5W" | temp$shortForm == "4M"),]
temp$timeCategory <- factor(temp$timeCategory, levels = c("Baseline", "Post 1st dose", "two Weeks", "Pre 2nd dose", "Post 2nd dose", "One month post\n2nd dose")) #,"Four months post\n2nd dose"))
if( anyNA(temp$timeCategory)) { temp <- temp[-is.na(temp$timeCategory),] }
ggplot(data = temp, aes(x = DPV, y = Record.ID, group = Record.ID)) + geom_vline(xintercept = 0, linetype = "dashed", alpha=0.5) + geom_path() +
geom_point(aes(fill = timeCategory, shape = timeCategory), size=4) + theme_bw() + xlab("Days relative to vaccine dose 1") + ylab("") +
scale_shape_manual(values=c(18:25)) + scale_fill_viridis_d() +
theme(axis.text = element_text(color="black",size=16), axis.title = element_text(color="black",size=16), axis.text.y = element_blank()) +
scale_x_continuous(breaks = seq(-100,200,20))
# ggsave(filename = "./Images/Subject_timecourse_overview.pdf")
———————– FINAL DATA OBJECT ——————————–
# write.csv(mergedData, file = "../Data/mergedData_postExclusions.csv")
# saveRDS(mergedData, file = "mergedData_postExclusions.Rds")
———————– OMIQ metaData export ——————————–
## ***** REMEMBER EXCLUSIONS ABOVE !!!! *******
# ## ***** also deleted CV-034_PHI-058_bL_CPT because it had no CD4 stain **********
#
# metaData <- mergedData[,c("fcsFile","Alias","Label","timeCategory","Sex","Prior.COVID.infection.","DPO.covid","DPV")]
# metaData <- metaData[-which(metaData$Label == "PHI-021_V1"),]
# # fileList <- data.frame(original = list.files(path = "../../COVIDvax_export_CD16loCD14lo/")) # all the fcs files that will go to OMIQ.ai
# fileList[! fileList %in% metaData$fcsFile]
# metaData$fcsFile[! metaData$fcsFile %in% fileList]
#
# fileList <- list.files(path = "../../COVIDvax_export_CD16loCD14lo/")
# metaData <- metaData[which(metaData$fcsFile %in% fileList),]
# metaData <- metaData[,c("fcsFile","Alias","Label","timeCategory","Sex","Prior.COVID.infection.","DPO.covid","DPV")]
# omiqID <- read.csv(file = "../../COVIDvax_export_CD16loCD14lo/20210316_metadata.csv")
# omiqID$Filename[! omiqID$Filename %in% metaData$fcsFile]
#
# omiqID <- merge(x = omiqID, y = metaData, by.x = "Filename", by.y = "fcsFile")
# omiqID <- omiqID[, c(2,1, 3:ncol(omiqID))]
# # write.csv(omiqID, file = "../Flow cytometry/COVIDvax_metaData_OMIQ.ai.csv", row.names = F)
—————— Activated T cells analyses ————————–
subsetData <- subset(mergedData, timeCategory != "two Weeks"& timeCategory != "2 wks post 2nd dose");
# subsetData <- subsetData[which(subsetData$Tube == "HEP"),]
subsetData <- subset(subsetData, Record.ID != "CV-011" & Record.ID != "CV-012" ) # absence of Ki67 stain
subsetData$timeCategory <- factor(subsetData$timeCategory, levels = c("Baseline", "Post 1st dose", "Pre 2nd dose", "Post 2nd dose", "One month post\n2nd dose"))
prePostTime(subsetData, xData = "DPV", yData="CD4_.CD38.Ki67._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "CD4 - Post 1st dose",
xLabel = "Days", yLabel = "Ki67+CD38+ (% CD4)", repMeasures = F, exponential=F) + coord_cartesian(xlim = c(-1,12)) + geom_vline(xintercept = 0,linetype="dashed", alpha=0.5)
## [1] "block2"
## Warning: Removed 10 row(s) containing missing values (geom_path).
## Warning: Removed 11 rows containing missing values (geom_point).
# ggsave(filename = "./Images/ActivCD4_bothCohorts_Vax1_continuousTime.pdf")
prePostTime(subsetData, xData = "DPV", yData="CD8_.CD38.Ki67._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "CD8 - Post 1st dose",
xLabel = "Days", yLabel = "Ki67+CD38+ (% CD8)", repMeasures = F, exponential=F) + coord_cartesian(xlim = c(-1,12)) + geom_vline(xintercept = 0,linetype="dashed" , alpha=0.5)
## [1] "block2"
## Warning: Removed 10 row(s) containing missing values (geom_path).
## Warning: Removed 11 rows containing missing values (geom_point).
# ggsave(filename = "./Images/ActivCD8_bothCohorts_Vax1_continuousTime.pdf")
subsetData$DPV <- subsetData$DPV - as.numeric(difftime(subsetData$Vaccine.2.date, subsetData$Vaccine.1.date, units="days" ) )
prePostTime(subsetData, xData = "DPV", yData="CD4_.CD38.Ki67._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "CD4 - Post 2nd dose",
xLabel = "Days", yLabel = "Ki67+CD38+ (% CD4)", repMeasures = F, exponential=F) + coord_cartesian(xlim = c(-5,12)) + geom_vline(xintercept = 0,linetype="dashed", alpha=0.5)
## [1] "block2"
## Warning: Removed 10 row(s) containing missing values (geom_path).
## Warning: Removed 11 rows containing missing values (geom_point).
# ggsave(filename = "./Images/ActivCD4_bothCohorts_Vax2_continuousTime.pdf")
prePostTime(subsetData, xData = "DPV", yData="CD8_.CD38.Ki67._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "CD8 - Post 2nd dose",
xLabel = "Days", yLabel = "Ki67+CD38+ (% CD8)", repMeasures = F, exponential=F) + coord_cartesian(xlim = c(-5,12)) + geom_vline(xintercept = 0,linetype="dashed" , alpha=0.5)
## [1] "block2"
## Warning: Removed 10 row(s) containing missing values (geom_path).
## Warning: Removed 11 rows containing missing values (geom_point).
# ggsave(filename = "./Images/ActivCD8_bothCohorts_Vax2_continuousTime.pdf")
*************** activated CD4 ********************
prePostTime(data = subsetData, xData = "timeCategory", yData="CD4_.CD38.Ki67._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "Activated CD4",
xLabel = " ", yLabel = "Ki67+CD38+ (% CD4)", repMeasures = F, exponential=F, newform = T)
## [1] "block3"
## Warning: `group_by_()` is deprecated as of dplyr 0.7.0.
## Please use `group_by()` instead.
## See vignette('programming') for more help
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_warnings()` to see where this warning was generated.
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Removed 10 row(s) containing missing values (geom_path).
## Warning: Removed 11 rows containing missing values (geom_point).
# ggsave(filename = "./Images/ActivCD4_bothCohorts_overTime.pdf")
bartlett.test(CD4_.CD38.Ki67._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
##
## Bartlett test of homogeneity of variances
##
## data: CD4_.CD38.Ki67._FreqParent by timeCategory
## Bartlett's K-squared = 9.5434, df = 4, p-value = 0.04886
kruskal_test(formula = CD4_.CD38.Ki67._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 CD4_.CD38.Ki67._FreqParent 92 19.3 4 0.000691 Kruskal-Wallis
dunn_test(CD4_.CD38.Ki67._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 CD4_.CD~ Baseli~ "Post 1s~ 17 19 3.50 4.63e-4 0.00417 **
## 2 CD4_.CD~ Baseli~ "Pre 2nd~ 17 18 1.83 6.74e-2 0.404 ns
## 3 CD4_.CD~ Baseli~ "Post 2n~ 17 18 2.81 5.01e-3 0.0401 *
## 4 CD4_.CD~ Baseli~ "One mon~ 17 16 3.88 1.05e-4 0.00105 **
## 5 CD4_.CD~ Post 1~ "Pre 2nd~ 19 18 -1.67 9.43e-2 0.471 ns
## 6 CD4_.CD~ Post 1~ "Post 2n~ 19 18 -0.668 5.04e-1 1 ns
## 7 CD4_.CD~ Post 1~ "One mon~ 19 16 0.536 5.92e-1 1 ns
## 8 CD4_.CD~ Pre 2n~ "Post 2n~ 18 18 0.992 3.21e-1 0.970 ns
## 9 CD4_.CD~ Pre 2n~ "One mon~ 18 16 2.13 3.31e-2 0.232 ns
## 10 CD4_.CD~ Post 2~ "One mon~ 18 16 1.17 2.42e-1 0.970 ns
bartlett.test(CD4_.CD38.Ki67._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
##
## Bartlett test of homogeneity of variances
##
## data: CD4_.CD38.Ki67._FreqParent by timeCategory
## Bartlett's K-squared = 5.1362, df = 4, p-value = 0.2736
tukey_hsd( aov(CD4_.CD38.Ki67._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes')) )
## # A tibble: 10 x 9
## term group1 group2 null.value estimate conf.low conf.high p.adj p.adj.signif
## * <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 time~ Basel~ "Post~ 0 -0.135 -0.839 0.570 0.983 ns
## 2 time~ Basel~ "Pre ~ 0 -0.306 -1.02 0.411 0.751 ns
## 3 time~ Basel~ "Post~ 0 -0.345 -1.05 0.359 0.644 ns
## 4 time~ Basel~ "One ~ 0 -0.173 -0.878 0.531 0.958 ns
## 5 time~ Post ~ "Pre ~ 0 -0.172 -0.861 0.518 0.956 ns
## 6 time~ Post ~ "Post~ 0 -0.211 -0.887 0.466 0.905 ns
## 7 time~ Post ~ "One ~ 0 -0.0387 -0.716 0.638 1 ns
## 8 time~ Pre 2~ "Post~ 0 -0.0391 -0.729 0.651 1 ns
## 9 time~ Pre 2~ "One ~ 0 0.133 -0.557 0.823 0.983 ns
## 10 time~ Post ~ "One ~ 0 0.172 -0.505 0.849 0.953 ns
prePostTime(data = subsetData, xData = "timeCategory", yData="CD4_.CD38.Ki67._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "Activated CD4",
xLabel = " ", yLabel = "Ki67+CD38+ (% CD4)", repMeasures = F, exponential=F, newform = T, recentCOVID = T)
## [1] "block3.1 recentCOVID"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Removed 10 row(s) containing missing values (geom_path).
## Warning: Removed 11 rows containing missing values (geom_point).
# ggsave(filename = "./Images/ActivCD4_bothCohorts_overTime_recentCOVID.pdf")
*************** activated CD8 ********************
prePostTime(data = subsetData, xData = "timeCategory", yData="CD8_.CD38.Ki67._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "Activated CD8",
xLabel = " ", yLabel = "Ki67+CD38+ (% CD8)", repMeasures = F, exponential=F, newform = T) + scale_y_continuous(breaks=seq(0,10,1), limits = c(0,5.5)) # +
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Removed 10 row(s) containing missing values (geom_path).
## Warning: Removed 11 rows containing missing values (geom_point).
# ggrepel::geom_text_repel(data = subset(mergedData, Alias =="PHI-071"), aes(label = Label))
# ggsave(filename = "./Images/ActivCD8_bothCohorts_overTime.pdf")
bartlett.test(CD8_.CD38.Ki67._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
##
## Bartlett test of homogeneity of variances
##
## data: CD8_.CD38.Ki67._FreqParent by timeCategory
## Bartlett's K-squared = 56.445, df = 4, p-value = 1.617e-11
kruskal_test(formula = CD8_.CD38.Ki67._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 CD8_.CD38.Ki67._FreqParent 92 24.5 4 0.0000626 Kruskal-Wallis
dunn_test(CD8_.CD38.Ki67._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 CD8_.CD~ Baseli~ "Post 1s~ 17 19 2.57 1.02e-2 8.17e-2 ns
## 2 CD8_.CD~ Baseli~ "Pre 2nd~ 17 18 2.14 3.21e-2 2.05e-1 ns
## 3 CD8_.CD~ Baseli~ "Post 2n~ 17 18 4.29 1.77e-5 1.77e-4 ***
## 4 CD8_.CD~ Baseli~ "One mon~ 17 16 4.14 3.48e-5 3.13e-4 ***
## 5 CD8_.CD~ Post 1~ "Pre 2nd~ 19 18 -0.403 6.87e-1 1.00e+0 ns
## 6 CD8_.CD~ Post 1~ "Post 2n~ 19 18 1.81 7.09e-2 2.84e-1 ns
## 7 CD8_.CD~ Post 1~ "One mon~ 19 16 1.72 8.50e-2 2.84e-1 ns
## 8 CD8_.CD~ Pre 2n~ "Post 2n~ 18 18 2.18 2.93e-2 2.05e-1 ns
## 9 CD8_.CD~ Pre 2n~ "One mon~ 18 16 2.09 3.69e-2 2.05e-1 ns
## 10 CD8_.CD~ Post 2~ "One mon~ 18 16 -0.0281 9.78e-1 1.00e+0 ns
bartlett.test(CD8_.CD38.Ki67._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
##
## Bartlett test of homogeneity of variances
##
## data: CD8_.CD38.Ki67._FreqParent by timeCategory
## Bartlett's K-squared = 11.124, df = 4, p-value = 0.0252
kruskal_test(formula = CD8_.CD38.Ki67._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 CD8_.CD38.Ki67._FreqParent 74 16.0 4 0.00298 Kruskal-Wallis
dunn_test(CD8_.CD38.Ki67._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 CD8_.CD~ Baseli~ "Post 1s~ 12 14 1.26 2.08e-1 1 ns
## 2 CD8_.CD~ Baseli~ "Pre 2nd~ 12 13 0.817 4.14e-1 1 ns
## 3 CD8_.CD~ Baseli~ "Post 2n~ 12 14 3.39 6.89e-4 0.00620 **
## 4 CD8_.CD~ Baseli~ "One mon~ 12 14 0.0901 9.28e-1 1 ns
## 5 CD8_.CD~ Post 1~ "Pre 2nd~ 14 13 -0.438 6.62e-1 1 ns
## 6 CD8_.CD~ Post 1~ "Post 2n~ 14 14 2.22 2.63e-2 0.184 ns
## 7 CD8_.CD~ Post 1~ "One mon~ 14 14 -1.22 2.23e-1 1 ns
## 8 CD8_.CD~ Pre 2n~ "Post 2n~ 13 14 2.62 8.86e-3 0.0709 ns
## 9 CD8_.CD~ Pre 2n~ "One mon~ 13 14 -0.757 4.49e-1 1 ns
## 10 CD8_.CD~ Post 2~ "One mon~ 14 14 -3.44 5.84e-4 0.00584 **
prePostTime(data = subsetData, xData = "timeCategory", yData="CD8_.CD38.Ki67._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "Activated CD8",
xLabel = " ", yLabel = "Ki67+CD38+ (% CD8)", repMeasures = F, exponential=F, newform = T, recentCOVID = T)
## [1] "block3.1 recentCOVID"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Removed 10 row(s) containing missing values (geom_path).
## Warning: Removed 11 rows containing missing values (geom_point).
# ggsave(filename = "./Images/ActivCD8_bothCohorts_overTime_recentCOVID.pdf")
subsetData <- subset(mergedData, Record.ID != "CV-011" & Record.ID != "CV-012" & Record.ID != "CV-005") # absence of Ki67 stain
subsetData <- subset(subsetData, timeCategory == "Baseline")
twoSampleBar(data = subsetData, xData = "Prior.COVID.infection.", yData = "FCActivCD4_Vax1", fillParam = "Prior.COVID.infection.", title = "Activ CD4",
yLabel = "Fold-change at one week", nonparam = T)
## Warning: Removed 5 rows containing missing values (position_quasirandom).
—————— AIM analyses ————————–
subsetData <- subset(mergedData, timeCategory != "two Weeks"& timeCategory != "2 wks post 2nd dose")
******************** CD4 analyses ********************
twoSampleBar(data = subset(subsetData, timeCategory == "Baseline"), xData = "Prior.COVID.infection.", yData = "AIM_CD4.CD69.CD200._FreqParent",
fillParam = "Prior.COVID.infection.", title = "Baseline", yLabel = "CD69+ CD200+ (% CD4)", nonparam = T)
## Warning: Removed 26 rows containing missing values (position_quasirandom).
# ggsave(filename = "./Images/AIM_CD4_CD69CD200_baseline.pdf", width = 5)
prePostTime(subsetData, xData = "timeCategory", yData="AIM_CD4.CD69.CD200._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "CD69+CD200+ CD4",
xLabel = " ", yLabel = "CD69+CD200+ (% CD4)", repMeasures = F, exponential=F, newform = T) + scale_y_continuous(trans="log10", limits = c(0.002, 0.8))
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Removed 118 row(s) containing missing values (geom_path).
## Warning: Removed 118 rows containing missing values (geom_point).
# ggsave(filename = "./Images/AIM_CD4_CD69CD200_overTime.pdf")
bartlett.test(AIM_CD4.CD69.CD200._FreqParent ~ timeCategory, data=subsetData)
##
## Bartlett test of homogeneity of variances
##
## data: AIM_CD4.CD69.CD200._FreqParent by timeCategory
## Bartlett's K-squared = 49.709, df = 4, p-value = 4.154e-10
kruskal_test(formula = AIM_CD4.CD69.CD200._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 AIM_CD4.CD69.CD200._FreqParent 102 17.1 4 0.00184 Kruskal-Wallis
dunn_test(formula = AIM_CD4.CD69.CD200._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 AIM_CD4.~ Baseli~ "Post 1s~ 6 6 0.312 0.755 1 ns
## 2 AIM_CD4.~ Baseli~ "Pre 2nd~ 6 6 2.53 0.0116 0.0809 ns
## 3 AIM_CD4.~ Baseli~ "Post 2n~ 6 6 2.77 0.00558 0.0502 ns
## 4 AIM_CD4.~ Baseli~ "One mon~ 6 6 3.08 0.00205 0.0205 *
## 5 AIM_CD4.~ Post 1~ "Pre 2nd~ 6 6 2.21 0.0268 0.134 ns
## 6 AIM_CD4.~ Post 1~ "Post 2n~ 6 6 2.46 0.0139 0.0834 ns
## 7 AIM_CD4.~ Post 1~ "One mon~ 6 6 2.77 0.00558 0.0502 ns
## 8 AIM_CD4.~ Pre 2n~ "Post 2n~ 6 6 0.246 0.806 1 ns
## 9 AIM_CD4.~ Pre 2n~ "One mon~ 6 6 0.558 0.577 1 ns
## 10 AIM_CD4.~ Post 2~ "One mon~ 6 6 0.312 0.755 1 ns
tukey_hsd(aov(AIM_CD4.CD69.CD200._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes')))
## # A tibble: 10 x 9
## term group1 group2 null.value estimate conf.low conf.high p.adj p.adj.signif
## * <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 time~ Basel~ "Post~ 0 1.79e-2 -0.0171 0.0529 0.565 ns
## 2 time~ Basel~ "Pre ~ 0 1.72e-2 -0.0178 0.0523 0.599 ns
## 3 time~ Basel~ "Post~ 0 1.23e-2 -0.0227 0.0473 0.836 ns
## 4 time~ Basel~ "One ~ 0 1.82e-2 -0.0168 0.0533 0.548 ns
## 5 time~ Post ~ "Pre ~ 0 -6.67e-4 -0.0320 0.0306 1 ns
## 6 time~ Post ~ "Post~ 0 -5.64e-3 -0.0369 0.0257 0.983 ns
## 7 time~ Post ~ "One ~ 0 3.33e-4 -0.0310 0.0316 1 ns
## 8 time~ Pre 2~ "Post~ 0 -4.97e-3 -0.0363 0.0263 0.989 ns
## 9 time~ Pre 2~ "One ~ 0 1.00e-3 -0.0303 0.0323 1 ns
## 10 time~ Post ~ "One ~ 0 5.97e-3 -0.0253 0.0373 0.979 ns
# kruskal_test(formula = AIM_CD4.CD69.CD200._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
# dunn_test(formula = AIM_CD4.CD69.CD200._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
subsetData <- subset(mergedData, timeCategory == "Baseline" | timeCategory == "One month post\n2nd dose")
FC_response2 <- dcast( subsetData, `Record.ID`+`Alias` + `Prior.COVID.infection.` ~`timeCategory`, value.var = c("AIM_CD4.CD69.CD200._FreqParent"))
FC_response2$FoldChange <- FC_response2$`One month post\n2nd dose`/FC_response2$`Baseline`; FC_response2$Cohort <- NULL
FC_response2 <- FC_response2[!is.infinite(FC_response2$FoldChange), ]
FC_response2 %>% group_by(Prior.COVID.infection.) %>% get_summary_stats(type = "common")
## # A tibble: 6 x 11
## Prior.COVID.inf~ variable n min max median iqr mean sd se
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 No "Baseli~ 5 0.006 0.04 0.013 0.016 0.018 0.014 0.006
## 2 No "FoldCh~ 5 2.25 26.9 9.22 7.96 11.3 9.66 4.32
## 3 No "One mo~ 5 0.029 0.35 0.09 0.233 0.171 0.147 0.066
## 4 Yes "Baseli~ 4 0.013 0.027 0.024 0.007 0.022 0.006 0.003
## 5 Yes "FoldCh~ 3 0.963 2.57 2.15 0.804 1.90 0.835 0.482
## 6 Yes "One mo~ 6 0.025 0.056 0.04 0.026 0.04 0.015 0.006
## # ... with 1 more variable: ci <dbl>
wilcox_test( data = FC_response2, formula = FoldChange ~ Prior.COVID.infection.)
## # A tibble: 1 x 7
## .y. group1 group2 n1 n2 statistic p
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl>
## 1 FoldChange No Yes 20 15 14 0.0714
subsetData <- subset(mergedData, timeCategory != "two Weeks" & timeCategory != "2 wks post 2nd dose")
prePostTime(subsetData, xData = "timeCategory", yData="AIM_CD4.CD69.CD200._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "CD69+CD200+ CD4",
xLabel = " ", yLabel = "CD69+CD200+ (% CD4)", repMeasures = F, exponential=F, newform = T, recentCOVID = T) + scale_y_continuous(trans="log10", limits = c(0.002, 0.8))
## [1] "block3.1 recentCOVID"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Removed 118 row(s) containing missing values (geom_path).
## Warning: Removed 118 rows containing missing values (geom_point).
## Warning: Removed 5 row(s) containing missing values (geom_path).
# ggsave(filename = "./Images/AIM_CD4_CD69CD200_overTime_recentCOVID.pdf")
prePostTime(subsetData, xData = "timeCategory", yData="AIM_CD4.Ox40.CD137._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "OX40+CD137+ CD4",
xLabel = " ", yLabel = "CD137+OX40+ (% CD4)", repMeasures = F, exponential=F, newform = T) + scale_y_continuous(trans = "log10")
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Removed 118 row(s) containing missing values (geom_path).
## Warning: Removed 118 rows containing missing values (geom_point).
# ggsave(filename = "./Images/AIM_CD4_CD137Ox40_overTime.pdf")
bartlett.test(AIM_CD4.Ox40.CD137._FreqParent ~ timeCategory, data=subsetData)
##
## Bartlett test of homogeneity of variances
##
## data: AIM_CD4.Ox40.CD137._FreqParent by timeCategory
## Bartlett's K-squared = 18.986, df = 4, p-value = 0.0007909
kruskal_test(formula = AIM_CD4.Ox40.CD137._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 AIM_CD4.Ox40.CD137._FreqParent 102 12.7 4 0.0131 Kruskal-Wallis
dunn_test(formula = AIM_CD4.Ox40.CD137._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 AIM_CD4.~ Baseli~ "Post 1s~ 6 6 0.492 0.623 1 ns
## 2 AIM_CD4.~ Baseli~ "Pre 2nd~ 6 6 2.21 0.0268 0.188 ns
## 3 AIM_CD4.~ Baseli~ "Post 2n~ 6 6 2.44 0.0145 0.131 ns
## 4 AIM_CD4.~ Baseli~ "One mon~ 6 6 2.80 0.00504 0.0504 ns
## 5 AIM_CD4.~ Post 1~ "Pre 2nd~ 6 6 1.72 0.0851 0.425 ns
## 6 AIM_CD4.~ Post 1~ "Post 2n~ 6 6 1.95 0.0510 0.306 ns
## 7 AIM_CD4.~ Post 1~ "One mon~ 6 6 2.31 0.0208 0.166 ns
## 8 AIM_CD4.~ Pre 2n~ "Post 2n~ 6 6 0.230 0.818 1 ns
## 9 AIM_CD4.~ Pre 2n~ "One mon~ 6 6 0.590 0.555 1 ns
## 10 AIM_CD4.~ Post 2~ "One mon~ 6 6 0.361 0.718 1 ns
kruskal_test(formula = AIM_CD4.Ox40.CD137._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 AIM_CD4.Ox40.CD137._FreqParent 74 1.60 4 0.809 Kruskal-Wallis
dunn_test(formula = AIM_CD4.Ox40.CD137._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 AIM_CD4.Ox~ Baseli~ "Post 1st~ 4 6 0.377 0.706 1 ns
## 2 AIM_CD4.Ox~ Baseli~ "Pre 2nd ~ 4 6 0.0314 0.975 1 ns
## 3 AIM_CD4.Ox~ Baseli~ "Post 2nd~ 4 6 -0.502 0.615 1 ns
## 4 AIM_CD4.Ox~ Baseli~ "One mont~ 4 6 0.534 0.594 1 ns
## 5 AIM_CD4.Ox~ Post 1~ "Pre 2nd ~ 6 6 -0.386 0.699 1 ns
## 6 AIM_CD4.Ox~ Post 1~ "Post 2nd~ 6 6 -0.983 0.326 1 ns
## 7 AIM_CD4.Ox~ Post 1~ "One mont~ 6 6 0.176 0.861 1 ns
## 8 AIM_CD4.Ox~ Pre 2n~ "Post 2nd~ 6 6 -0.597 0.551 1 ns
## 9 AIM_CD4.Ox~ Pre 2n~ "One mont~ 6 6 0.562 0.574 1 ns
## 10 AIM_CD4.Ox~ Post 2~ "One mont~ 6 6 1.16 0.247 1 ns
******************** CD8 analyses ********************
twoSampleBar(data = subset(subsetData, timeCategory == "Baseline"), xData = "Prior.COVID.infection.", yData = "AIM_CD8.CD137.IFNg._FreqParent",
fillParam = "Prior.COVID.infection.", title = "Baseline", yLabel = "CD137+ IFNg+ (% CD8)", nonparam = T)
## Warning: Removed 26 rows containing missing values (position_quasirandom).
# ggsave(filename = "./Images/AIM_CD8_CD137IFNg_baseline.pdf", width = 5)
prePostTime(subsetData, xData = "timeCategory", yData="AIM_CD8.CD137.IFNg._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "CD137+IFNg+ CD8",
xLabel = " ", yLabel = "CD137+IFNg+ (% CD8)", repMeasures = F, exponential=F, newform = T) + scale_y_continuous(trans = "log10", limits = c(0.0003,0.5))
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Removed 118 row(s) containing missing values (geom_path).
## Warning: Removed 118 rows containing missing values (geom_point).
# ggsave(filename = "./Images/AIM_CD8_CD137IFNg_overTime.pdf")
bartlett.test(AIM_CD8.CD137.IFNg._FreqParent ~ timeCategory, data=subsetData)
##
## Bartlett test of homogeneity of variances
##
## data: AIM_CD8.CD137.IFNg._FreqParent by timeCategory
## Bartlett's K-squared = 53.51, df = 4, p-value = 6.664e-11
kruskal_test(formula = AIM_CD8.CD137.IFNg._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 AIM_CD8.CD137.IFNg._FreqParent 102 15.0 4 0.00474 Kruskal-Wallis
dunn_test(formula = AIM_CD8.CD137.IFNg._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 AIM_CD8.~ Baseli~ "Post 1~ 6 6 -0.538 5.91e-1 1 ns
## 2 AIM_CD8.~ Baseli~ "Pre 2n~ 6 6 0.639 5.23e-1 1 ns
## 3 AIM_CD8.~ Baseli~ "Post 2~ 6 6 1.75 8.04e-2 0.482 ns
## 4 AIM_CD8.~ Baseli~ "One mo~ 6 6 2.86 4.26e-3 0.0384 *
## 5 AIM_CD8.~ Post 1~ "Pre 2n~ 6 6 1.18 2.39e-1 1 ns
## 6 AIM_CD8.~ Post 1~ "Post 2~ 6 6 2.29 2.22e-2 0.178 ns
## 7 AIM_CD8.~ Post 1~ "One mo~ 6 6 3.40 6.84e-4 0.00684 **
## 8 AIM_CD8.~ Pre 2n~ "Post 2~ 6 6 1.11 2.67e-1 1 ns
## 9 AIM_CD8.~ Pre 2n~ "One mo~ 6 6 2.22 2.65e-2 0.185 ns
## 10 AIM_CD8.~ Post 2~ "One mo~ 6 6 1.11 2.67e-1 1 ns
kruskal_test(formula = AIM_CD8.CD137.IFNg._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 AIM_CD8.CD137.IFNg._FreqParent 74 1.15 4 0.886 Kruskal-Wallis
# dunn_test(formula = AIM_CD8.CD137.IFNg._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
subsetData <- subset(mergedData, timeCategory == "Baseline" | timeCategory == "One month post\n2nd dose")
FC_response2 <- dcast( subsetData, `Record.ID`+`Alias` + `Prior.COVID.infection.` ~`timeCategory`, value.var = c("AIM_CD8.CD137.IFNg._FreqParent"))
FC_response2$FoldChange <- FC_response2$`One month post\n2nd dose`/FC_response2$`Baseline`; FC_response2$Cohort <- NULL
FC_response2 <- FC_response2[!is.infinite(FC_response2$FoldChange), ]
FC_response2 %>% group_by(Prior.COVID.infection.) %>% get_summary_stats(type = "common")
## # A tibble: 6 x 11
## Prior.COVID.inf~ variable n min max median iqr mean sd se
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 No "Baseli~ 3 0.002 0.003 0.002 0.001 0.003 0.001 0
## 2 No "FoldCh~ 3 1.85 24.3 4.97 11.2 10.4 12.1 7.01
## 3 No "One mo~ 3 0.006 0.058 0.009 0.026 0.025 0.029 0.017
## 4 Yes "Baseli~ 4 0.002 0.028 0.011 0.009 0.013 0.011 0.005
## 5 Yes "FoldCh~ 3 2.46 7.14 5.80 2.34 5.13 2.41 1.39
## 6 Yes "One mo~ 6 0 0.2 0.017 0.016 0.044 0.077 0.031
## # ... with 1 more variable: ci <dbl>
wilcox_test( data = FC_response2, formula = FoldChange ~ Prior.COVID.infection.)
## # A tibble: 1 x 7
## .y. group1 group2 n1 n2 statistic p
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl>
## 1 FoldChange No Yes 18 15 4 1
subsetData <- subset(mergedData, timeCategory != "two Weeks" & timeCategory != "2 wks post 2nd dose")
prePostTime(subsetData, xData = "timeCategory", yData="AIM_CD8.CD137.IFNg._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "CD137+IFNg+ CD8",
xLabel = " ", yLabel = "CD137+IFNg+ (% CD8)", repMeasures = F, exponential=F, newform = T, recentCOVID = T) + scale_y_continuous(trans = "log10", limits = c(0.0003,0.5))
## [1] "block3.1 recentCOVID"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Removed 118 row(s) containing missing values (geom_path).
## Warning: Removed 118 rows containing missing values (geom_point).
## Warning: Removed 5 row(s) containing missing values (geom_path).
# ggsave(filename = "./Images/AIM_CD8_CD137IFNg_overTime_recentCOVID.pdf")
prePostTime(subsetData, xData = "timeCategory", yData="AIM_CD8.CD69.CD200._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "CD69+CD200+ CD8",
xLabel = " ", yLabel = "CD69+CD200+ (% CD8)", repMeasures = F, exponential=F, newform = T)
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Removed 118 row(s) containing missing values (geom_path).
## Warning: Removed 118 rows containing missing values (geom_point).
# ggsave(filename = "./Images/AIM_CD8_CD69CD200_overTime.pdf")
prePostTime(subsetData, xData = "timeCategory", yData="AIM_CD8.Ox40.CD137._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "OX40+CD137+ CD8",
xLabel = " ", yLabel = "CD137+OX40+ (% CD8)", repMeasures = F, exponential=F, newform = T) + scale_y_continuous(trans = "log10")
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Removed 118 row(s) containing missing values (geom_path).
## Warning: Removed 118 rows containing missing values (geom_point).
# ggsave(filename = "./Images/AIM_CD8_CD137Ox40_overTime.pdf")
bartlett.test(AIM_CD8.Ox40.CD137._FreqParent ~ timeCategory, data=subsetData)
##
## Bartlett test of homogeneity of variances
##
## data: AIM_CD8.Ox40.CD137._FreqParent by timeCategory
## Bartlett's K-squared = 33.349, df = 4, p-value = 1.013e-06
kruskal_test(formula = AIM_CD8.Ox40.CD137._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 AIM_CD8.Ox40.CD137._FreqParent 102 12.9 4 0.0115 Kruskal-Wallis
dunn_test(formula = AIM_CD8.Ox40.CD137._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 AIM_CD8.~ Baseli~ "Post 1s~ 6 6 -1.49 0.136 0.813 ns
## 2 AIM_CD8.~ Baseli~ "Pre 2nd~ 6 6 0 1 1 ns
## 3 AIM_CD8.~ Baseli~ "Post 2n~ 6 6 1.33 0.184 0.813 ns
## 4 AIM_CD8.~ Baseli~ "One mon~ 6 6 1.72 0.0850 0.680 ns
## 5 AIM_CD8.~ Post 1~ "Pre 2nd~ 6 6 1.49 0.136 0.813 ns
## 6 AIM_CD8.~ Post 1~ "Post 2n~ 6 6 2.82 0.00479 0.0431 *
## 7 AIM_CD8.~ Post 1~ "One mon~ 6 6 3.21 0.00131 0.0131 *
## 8 AIM_CD8.~ Pre 2n~ "Post 2n~ 6 6 1.33 0.184 0.813 ns
## 9 AIM_CD8.~ Pre 2n~ "One mon~ 6 6 1.72 0.0850 0.680 ns
## 10 AIM_CD8.~ Post 2~ "One mon~ 6 6 0.394 0.694 1 ns
kruskal_test(formula = AIM_CD8.Ox40.CD137._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 AIM_CD8.Ox40.CD137._FreqParent 74 3.19 4 0.526 Kruskal-Wallis
dunn_test(formula = AIM_CD8.Ox40.CD137._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 AIM_CD8.O~ Baseline "Post 1s~ 4 6 -1.28 0.200 1 ns
## 2 AIM_CD8.O~ Baseline "Pre 2nd~ 4 6 -1.09 0.275 1 ns
## 3 AIM_CD8.O~ Baseline "Post 2n~ 4 6 -1.72 0.0853 0.853 ns
## 4 AIM_CD8.O~ Baseline "One mon~ 4 6 -0.856 0.392 1 ns
## 5 AIM_CD8.O~ Post 1s~ "Pre 2nd~ 6 6 0.211 0.833 1 ns
## 6 AIM_CD8.O~ Post 1s~ "Post 2n~ 6 6 -0.492 0.623 1 ns
## 7 AIM_CD8.O~ Post 1s~ "One mon~ 6 6 0.474 0.635 1 ns
## 8 AIM_CD8.O~ Pre 2nd~ "Post 2n~ 6 6 -0.703 0.482 1 ns
## 9 AIM_CD8.O~ Pre 2nd~ "One mon~ 6 6 0.264 0.792 1 ns
## 10 AIM_CD8.O~ Post 2n~ "One mon~ 6 6 0.966 0.334 1 ns
prePostTime(subsetData, xData = "timeCategory", yData="AIM_CD4.TNF._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "TNF+ CD4",
xLabel = " ", yLabel = "TNF+ (% CD4)", repMeasures = F, exponential=F, newform = T) + scale_y_continuous(trans="log10")
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Removed 118 row(s) containing missing values (geom_path).
## Warning: Removed 118 rows containing missing values (geom_point).
# ggsave(filename = "./Images/AIM_CD4_TNF_overTime.pdf")
bartlett.test(AIM_CD4.TNF._FreqParent ~ timeCategory, data=subsetData)
##
## Bartlett test of homogeneity of variances
##
## data: AIM_CD4.TNF._FreqParent by timeCategory
## Bartlett's K-squared = 34.701, df = 4, p-value = 5.352e-07
kruskal_test(formula = AIM_CD4.TNF._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 AIM_CD4.TNF._FreqParent 102 15.3 4 0.00415 Kruskal-Wallis
dunn_test(formula = AIM_CD4.TNF._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 AIM_CD4.~ Baseli~ "Post 1s~ 6 6 0.541 0.588 1 ns
## 2 AIM_CD4.~ Baseli~ "Pre 2nd~ 6 6 2.18 0.0292 0.204 ns
## 3 AIM_CD4.~ Baseli~ "Post 2n~ 6 6 2.53 0.0116 0.0925 ns
## 4 AIM_CD4.~ Baseli~ "One mon~ 6 6 3.28 0.00104 0.0104 *
## 5 AIM_CD4.~ Post 1~ "Pre 2nd~ 6 6 1.64 0.101 0.505 ns
## 6 AIM_CD4.~ Post 1~ "Post 2n~ 6 6 1.98 0.0472 0.283 ns
## 7 AIM_CD4.~ Post 1~ "One mon~ 6 6 2.74 0.00617 0.0556 ns
## 8 AIM_CD4.~ Pre 2n~ "Post 2n~ 6 6 0.344 0.731 1 ns
## 9 AIM_CD4.~ Pre 2n~ "One mon~ 6 6 1.10 0.272 1 ns
## 10 AIM_CD4.~ Post 2~ "One mon~ 6 6 0.754 0.451 1 ns
kruskal_test(formula = AIM_CD4.TNF._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 AIM_CD4.TNF._FreqParent 74 2.99 4 0.56 Kruskal-Wallis
dunn_test(formula = AIM_CD4.TNF._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 AIM_CD4.~ Baseline "Post 1st~ 4 6 0.856 0.392 1 ns
## 2 AIM_CD4.~ Baseline "Pre 2nd ~ 4 6 1.06 0.289 1 ns
## 3 AIM_CD4.~ Baseline "Post 2nd~ 4 6 0.887 0.375 1 ns
## 4 AIM_CD4.~ Baseline "One mont~ 4 6 1.70 0.0883 0.883 ns
## 5 AIM_CD4.~ Post 1s~ "Pre 2nd ~ 6 6 0.228 0.819 1 ns
## 6 AIM_CD4.~ Post 1s~ "Post 2nd~ 6 6 0.0351 0.972 1 ns
## 7 AIM_CD4.~ Post 1s~ "One mont~ 6 6 0.948 0.343 1 ns
## 8 AIM_CD4.~ Pre 2nd~ "Post 2nd~ 6 6 -0.193 0.847 1 ns
## 9 AIM_CD4.~ Pre 2nd~ "One mont~ 6 6 0.720 0.472 1 ns
## 10 AIM_CD4.~ Post 2n~ "One mont~ 6 6 0.913 0.361 1 ns
prePostTime(subsetData, xData = "timeCategory", yData="AIM_CD8.TNF._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "TNF+ CD8",
xLabel = " ", yLabel = "TNF+ (% CD8)", repMeasures = F, exponential=F, newform = T) + scale_y_continuous(trans="log10")
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Removed 118 row(s) containing missing values (geom_path).
## Warning: Removed 118 rows containing missing values (geom_point).
# ggsave(filename = "./Images/AIM_CD8_TNF_overTime.pdf")
bartlett.test(AIM_CD8.TNF._FreqParent ~ timeCategory, data=subsetData)
##
## Bartlett test of homogeneity of variances
##
## data: AIM_CD8.TNF._FreqParent by timeCategory
## Bartlett's K-squared = 28.845, df = 4, p-value = 8.407e-06
kruskal_test(formula = AIM_CD8.TNF._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 AIM_CD8.TNF._FreqParent 102 12.9 4 0.0116 Kruskal-Wallis
dunn_test(formula = AIM_CD8.TNF._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 AIM_CD8.~ Baseli~ "Post 1s~ 6 6 0.197 0.844 1 ns
## 2 AIM_CD8.~ Baseli~ "Pre 2nd~ 6 6 0.953 0.341 1 ns
## 3 AIM_CD8.~ Baseli~ "Post 2n~ 6 6 2.14 0.0326 0.261 ns
## 4 AIM_CD8.~ Baseli~ "One mon~ 6 6 2.96 0.00310 0.0310 *
## 5 AIM_CD8.~ Post 1~ "Pre 2nd~ 6 6 0.756 0.450 1 ns
## 6 AIM_CD8.~ Post 1~ "Post 2n~ 6 6 1.94 0.0525 0.315 ns
## 7 AIM_CD8.~ Post 1~ "One mon~ 6 6 2.76 0.00576 0.0519 ns
## 8 AIM_CD8.~ Pre 2n~ "Post 2n~ 6 6 1.18 0.237 1 ns
## 9 AIM_CD8.~ Pre 2n~ "One mon~ 6 6 2.00 0.0450 0.315 ns
## 10 AIM_CD8.~ Post 2~ "One mon~ 6 6 0.822 0.411 1 ns
kruskal_test(formula = AIM_CD8.TNF._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 AIM_CD8.TNF._FreqParent 74 1.94 4 0.747 Kruskal-Wallis
dunn_test(formula = AIM_CD8.TNF._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 AIM_CD8.T~ Baseline "Post 1st~ 4 6 -0.440 0.660 1 ns
## 2 AIM_CD8.T~ Baseline "Pre 2nd ~ 4 6 -0.518 0.604 1 ns
## 3 AIM_CD8.T~ Baseline "Post 2nd~ 4 6 -0.738 0.460 1 ns
## 4 AIM_CD8.T~ Baseline "One mont~ 4 6 0.377 0.706 1 ns
## 5 AIM_CD8.T~ Post 1s~ "Pre 2nd ~ 6 6 -0.0878 0.930 1 ns
## 6 AIM_CD8.T~ Post 1s~ "Post 2nd~ 6 6 -0.334 0.739 1 ns
## 7 AIM_CD8.T~ Post 1s~ "One mont~ 6 6 0.913 0.361 1 ns
## 8 AIM_CD8.T~ Pre 2nd~ "Post 2nd~ 6 6 -0.246 0.806 1 ns
## 9 AIM_CD8.T~ Pre 2nd~ "One mont~ 6 6 1.00 0.317 1 ns
## 10 AIM_CD8.T~ Post 2n~ "One mont~ 6 6 1.25 0.213 1 ns
prePostTime(subsetData, xData = "timeCategory", yData="AIM_CD4.IFNg._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "IFNg+ CD4",
xLabel = " ", yLabel = "IFNg+ (% CD4)", repMeasures = F, exponential=F, newform = T) + scale_y_continuous(trans="log10")
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Removed 118 row(s) containing missing values (geom_path).
## Warning: Removed 118 rows containing missing values (geom_point).
# ggsave(filename = "./Images/AIM_CD4_IFNg_overTime.pdf")
bartlett.test(AIM_CD4.IFNg._FreqParent ~ timeCategory, data=subsetData)
##
## Bartlett test of homogeneity of variances
##
## data: AIM_CD4.IFNg._FreqParent by timeCategory
## Bartlett's K-squared = 22.681, df = 4, p-value = 0.0001466
kruskal_test(formula = AIM_CD4.IFNg._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 AIM_CD4.IFNg._FreqParent 102 10.9 4 0.0272 Kruskal-Wallis
dunn_test(formula = AIM_CD4.IFNg._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 AIM_CD4.I~ Baseli~ "Post 1st~ 6 6 0.0328 0.974 1 ns
## 2 AIM_CD4.I~ Baseli~ "Pre 2nd ~ 6 6 1.43 0.154 0.922 ns
## 3 AIM_CD4.I~ Baseli~ "Post 2nd~ 6 6 2.31 0.0208 0.174 ns
## 4 AIM_CD4.I~ Baseli~ "One mont~ 6 6 2.38 0.0174 0.174 ns
## 5 AIM_CD4.I~ Post 1~ "Pre 2nd ~ 6 6 1.39 0.163 0.922 ns
## 6 AIM_CD4.I~ Post 1~ "Post 2nd~ 6 6 2.28 0.0226 0.174 ns
## 7 AIM_CD4.I~ Post 1~ "One mont~ 6 6 2.35 0.0190 0.174 ns
## 8 AIM_CD4.I~ Pre 2n~ "Post 2nd~ 6 6 0.886 0.376 1 ns
## 9 AIM_CD4.I~ Pre 2n~ "One mont~ 6 6 0.951 0.342 1 ns
## 10 AIM_CD4.I~ Post 2~ "One mont~ 6 6 0.0656 0.948 1 ns
kruskal_test(formula = AIM_CD4.IFNg._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 AIM_CD4.IFNg._FreqParent 74 1.71 4 0.789 Kruskal-Wallis
dunn_test(formula = AIM_CD4.IFNg._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 AIM_CD4.I~ Baseline "Post 1st~ 4 6 1.21 0.226 1 ns
## 2 AIM_CD4.I~ Baseline "Pre 2nd ~ 4 6 1.05 0.293 1 ns
## 3 AIM_CD4.I~ Baseline "Post 2nd~ 4 6 0.723 0.470 1 ns
## 4 AIM_CD4.I~ Baseline "One mont~ 4 6 0.974 0.330 1 ns
## 5 AIM_CD4.I~ Post 1s~ "Pre 2nd ~ 6 6 -0.176 0.861 1 ns
## 6 AIM_CD4.I~ Post 1s~ "Post 2nd~ 6 6 -0.544 0.586 1 ns
## 7 AIM_CD4.I~ Post 1s~ "One mont~ 6 6 -0.263 0.792 1 ns
## 8 AIM_CD4.I~ Pre 2nd~ "Post 2nd~ 6 6 -0.369 0.712 1 ns
## 9 AIM_CD4.I~ Pre 2nd~ "One mont~ 6 6 -0.0878 0.930 1 ns
## 10 AIM_CD4.I~ Post 2n~ "One mont~ 6 6 0.281 0.779 1 ns
prePostTime(subsetData, xData = "timeCategory", yData="AIM_CD8.IFNg._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "IFNg+ CD8",
xLabel = " ", yLabel = "IFNg+ (% CD8)", repMeasures = F, exponential=F, newform = T) + scale_y_continuous(trans = "log10")
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Removed 118 row(s) containing missing values (geom_path).
## Warning: Removed 118 rows containing missing values (geom_point).
# ggsave(filename = "./Images/AIM_CD8_IFNg_overTime.pdf")
bartlett.test(AIM_CD8.IFNg._FreqParent ~ timeCategory, data=subsetData)
##
## Bartlett test of homogeneity of variances
##
## data: AIM_CD8.IFNg._FreqParent by timeCategory
## Bartlett's K-squared = 39.19, df = 4, p-value = 6.366e-08
kruskal_test(formula = AIM_CD8.IFNg._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 AIM_CD8.IFNg._FreqParent 102 9.47 4 0.0503 Kruskal-Wallis
dunn_test(formula = AIM_CD8.IFNg._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 AIM_CD8.~ Baseli~ "Post 1s~ 6 6 -1.02 0.309 1 ns
## 2 AIM_CD8.~ Baseli~ "Pre 2nd~ 6 6 0.361 0.718 1 ns
## 3 AIM_CD8.~ Baseli~ "Post 2n~ 6 6 1.12 0.264 1 ns
## 4 AIM_CD8.~ Baseli~ "One mon~ 6 6 1.84 0.0660 0.528 ns
## 5 AIM_CD8.~ Post 1~ "Pre 2nd~ 6 6 1.38 0.168 1 ns
## 6 AIM_CD8.~ Post 1~ "Post 2n~ 6 6 2.13 0.0328 0.296 ns
## 7 AIM_CD8.~ Post 1~ "One mon~ 6 6 2.86 0.00429 0.0429 *
## 8 AIM_CD8.~ Pre 2n~ "Post 2n~ 6 6 0.755 0.450 1 ns
## 9 AIM_CD8.~ Pre 2n~ "One mon~ 6 6 1.48 0.140 0.977 ns
## 10 AIM_CD8.~ Post 2~ "One mon~ 6 6 0.722 0.470 1 ns
kruskal_test(formula = AIM_CD8.IFNg._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 AIM_CD8.IFNg._FreqParent 74 2.61 4 0.626 Kruskal-Wallis
dunn_test(formula = AIM_CD8.IFNg._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 AIM_CD8.I~ Baseline "Post 1st~ 4 6 0.628 0.530 1 ns
## 2 AIM_CD8.I~ Baseline "Pre 2nd ~ 4 6 -0.314 0.753 1 ns
## 3 AIM_CD8.I~ Baseline "Post 2nd~ 4 6 0.801 0.423 1 ns
## 4 AIM_CD8.I~ Baseline "One mont~ 4 6 0.864 0.388 1 ns
## 5 AIM_CD8.I~ Post 1s~ "Pre 2nd ~ 6 6 -1.05 0.292 1 ns
## 6 AIM_CD8.I~ Post 1s~ "Post 2nd~ 6 6 0.193 0.847 1 ns
## 7 AIM_CD8.I~ Post 1s~ "One mont~ 6 6 0.263 0.792 1 ns
## 8 AIM_CD8.I~ Pre 2nd~ "Post 2nd~ 6 6 1.25 0.212 1 ns
## 9 AIM_CD8.I~ Pre 2nd~ "One mont~ 6 6 1.32 0.188 1 ns
## 10 AIM_CD8.I~ Post 2n~ "One mont~ 6 6 0.0702 0.944 1 ns
twoSampleBar(data = subset(subsetData, timeCategory == "Baseline"), xData = "Prior.COVID.infection.", yData = "AIM_CD8.IFNg._FreqParent",
fillParam = "Prior.COVID.infection.", title = "Baseline", yLabel = "CD69+ CD200+ (% CD4)", nonparam = T)
## Warning: Removed 26 rows containing missing values (position_quasirandom).
# ggsave(filename = "./Images/AIM_CD4_CD69CD200_baseline.pdf", width = 5)
subsetData <- subset(mergedData, timeCategory == "Baseline" | timeCategory == "One month post\n2nd dose")
FC_response2 <- dcast( subsetData, `Record.ID`+`Alias` + `Prior.COVID.infection.` ~`timeCategory`, value.var = c("AIM_CD8.IFNg._FreqParent"))
FC_response2$FC_AIMCD8_IFNg <- FC_response2$`One month post\n2nd dose`/FC_response2$`Baseline`; FC_response2$Cohort <- NULL
FC_response2 %>% group_by(Prior.COVID.infection.) %>% get_summary_stats(type = "common")
## # A tibble: 6 x 11
## Prior.COVID.inf~ variable n min max median iqr mean sd se
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 No "Baseli~ 6 0.001 0.009 0.002 0.001 0.003 0.003 0.001
## 2 No "FC_AIM~ 6 1.18 14.1 5.34 6.64 6.52 4.98 2.03
## 3 No "One mo~ 6 0.003 0.13 0.008 0.024 0.032 0.05 0.02
## 4 Yes "Baseli~ 4 0.001 0.039 0.009 0.012 0.014 0.017 0.008
## 5 Yes "FC_AIM~ 3 2.46 17.4 4.10 7.45 7.98 8.17 4.72
## 6 Yes "One mo~ 6 0.006 0.16 0.015 0.01 0.037 0.061 0.025
## # ... with 1 more variable: ci <dbl>
subsetData <- subset(mergedData, timeCategory != "two Weeks" & timeCategory != "2 wks post 2nd dose")
dunn_test(AIM_CD4.CD69.CD137._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 AIM_CD4.~ Baseli~ "Post 1~ 6 6 0.951 3.41e-1 1 ns
## 2 AIM_CD4.~ Baseli~ "Pre 2n~ 6 6 2.49 1.27e-2 0.101 ns
## 3 AIM_CD4.~ Baseli~ "Post 2~ 6 6 2.87 4.10e-3 0.0369 *
## 4 AIM_CD4.~ Baseli~ "One mo~ 6 6 3.36 7.73e-4 0.00773 **
## 5 AIM_CD4.~ Post 1~ "Pre 2n~ 6 6 1.54 1.23e-1 0.616 ns
## 6 AIM_CD4.~ Post 1~ "Post 2~ 6 6 1.92 5.50e-2 0.330 ns
## 7 AIM_CD4.~ Post 1~ "One mo~ 6 6 2.41 1.59e-2 0.111 ns
## 8 AIM_CD4.~ Pre 2n~ "Post 2~ 6 6 0.377 7.06e-1 1 ns
## 9 AIM_CD4.~ Pre 2n~ "One mo~ 6 6 0.869 3.85e-1 1 ns
## 10 AIM_CD4.~ Post 2~ "One mo~ 6 6 0.492 6.23e-1 1 ns
dunn_test(AIM_CD4.CD71.CD137._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 AIM_CD4.~ Baseli~ "Post 1s~ 6 6 0.854 0.393 1 ns
## 2 AIM_CD4.~ Baseli~ "Pre 2nd~ 6 6 2.36 0.0181 0.145 ns
## 3 AIM_CD4.~ Baseli~ "Post 2n~ 6 6 2.89 0.00386 0.0347 *
## 4 AIM_CD4.~ Baseli~ "One mon~ 6 6 3.17 0.00153 0.0153 *
## 5 AIM_CD4.~ Post 1~ "Pre 2nd~ 6 6 1.51 0.131 0.655 ns
## 6 AIM_CD4.~ Post 1~ "Post 2n~ 6 6 2.04 0.0418 0.251 ns
## 7 AIM_CD4.~ Post 1~ "One mon~ 6 6 2.31 0.0206 0.145 ns
## 8 AIM_CD4.~ Pre 2n~ "Post 2n~ 6 6 0.525 0.599 1 ns
## 9 AIM_CD4.~ Pre 2n~ "One mon~ 6 6 0.804 0.421 1 ns
## 10 AIM_CD4.~ Post 2~ "One mon~ 6 6 0.279 0.780 1 ns
dunn_test(AIM_CD4.CD40L._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 AIM_CD4.C~ Baseli~ "Post 1st~ 6 6 1.77 0.0766 0.766 ns
## 2 AIM_CD4.C~ Baseli~ "Pre 2nd ~ 6 6 1.00 0.317 1 ns
## 3 AIM_CD4.C~ Baseli~ "Post 2nd~ 6 6 1.16 0.244 1 ns
## 4 AIM_CD4.C~ Baseli~ "One mont~ 6 6 0.246 0.806 1 ns
## 5 AIM_CD4.C~ Post 1~ "Pre 2nd ~ 6 6 -0.771 0.441 1 ns
## 6 AIM_CD4.C~ Post 1~ "Post 2nd~ 6 6 -0.607 0.544 1 ns
## 7 AIM_CD4.C~ Post 1~ "One mont~ 6 6 -1.52 0.127 1 ns
## 8 AIM_CD4.C~ Pre 2n~ "Post 2nd~ 6 6 0.164 0.870 1 ns
## 9 AIM_CD4.C~ Pre 2n~ "One mont~ 6 6 -0.754 0.451 1 ns
## 10 AIM_CD4.C~ Post 2~ "One mont~ 6 6 -0.918 0.358 1 ns
dunn_test(AIM_CD8.CD40L._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 AIM_CD8.C~ Baseli~ "Post 1st~ 6 6 1.71 0.0880 0.792 ns
## 2 AIM_CD8.C~ Baseli~ "Pre 2nd ~ 6 6 0.361 0.718 1 ns
## 3 AIM_CD8.C~ Baseli~ "Post 2nd~ 6 6 0.443 0.658 1 ns
## 4 AIM_CD8.C~ Baseli~ "One mont~ 6 6 -0.213 0.831 1 ns
## 5 AIM_CD8.C~ Post 1~ "Pre 2nd ~ 6 6 -1.35 0.179 1 ns
## 6 AIM_CD8.C~ Post 1~ "Post 2nd~ 6 6 -1.26 0.207 1 ns
## 7 AIM_CD8.C~ Post 1~ "One mont~ 6 6 -1.92 0.0549 0.549 ns
## 8 AIM_CD8.C~ Pre 2n~ "Post 2nd~ 6 6 0.0820 0.935 1 ns
## 9 AIM_CD8.C~ Pre 2n~ "One mont~ 6 6 -0.574 0.566 1 ns
## 10 AIM_CD8.C~ Post 2~ "One mont~ 6 6 -0.656 0.512 1 ns
dunn_test(AIM_CD8.TNF._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 AIM_CD8.~ Baseli~ "Post 1s~ 6 6 0.197 0.844 1 ns
## 2 AIM_CD8.~ Baseli~ "Pre 2nd~ 6 6 0.953 0.341 1 ns
## 3 AIM_CD8.~ Baseli~ "Post 2n~ 6 6 2.14 0.0326 0.261 ns
## 4 AIM_CD8.~ Baseli~ "One mon~ 6 6 2.96 0.00310 0.0310 *
## 5 AIM_CD8.~ Post 1~ "Pre 2nd~ 6 6 0.756 0.450 1 ns
## 6 AIM_CD8.~ Post 1~ "Post 2n~ 6 6 1.94 0.0525 0.315 ns
## 7 AIM_CD8.~ Post 1~ "One mon~ 6 6 2.76 0.00576 0.0519 ns
## 8 AIM_CD8.~ Pre 2n~ "Post 2n~ 6 6 1.18 0.237 1 ns
## 9 AIM_CD8.~ Pre 2n~ "One mon~ 6 6 2.00 0.0450 0.315 ns
## 10 AIM_CD8.~ Post 2~ "One mon~ 6 6 0.822 0.411 1 ns
dunn_test(AIM_CD8.TNF._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 AIM_CD8.~ Baseli~ "Post 1s~ 6 6 0.197 0.844 1 ns
## 2 AIM_CD8.~ Baseli~ "Pre 2nd~ 6 6 0.953 0.341 1 ns
## 3 AIM_CD8.~ Baseli~ "Post 2n~ 6 6 2.14 0.0326 0.261 ns
## 4 AIM_CD8.~ Baseli~ "One mon~ 6 6 2.96 0.00310 0.0310 *
## 5 AIM_CD8.~ Post 1~ "Pre 2nd~ 6 6 0.756 0.450 1 ns
## 6 AIM_CD8.~ Post 1~ "Post 2n~ 6 6 1.94 0.0525 0.315 ns
## 7 AIM_CD8.~ Post 1~ "One mon~ 6 6 2.76 0.00576 0.0519 ns
## 8 AIM_CD8.~ Pre 2n~ "Post 2n~ 6 6 1.18 0.237 1 ns
## 9 AIM_CD8.~ Pre 2n~ "One mon~ 6 6 2.00 0.0450 0.315 ns
## 10 AIM_CD8.~ Post 2~ "One mon~ 6 6 0.822 0.411 1 ns
bivScatter(data1 = subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 2nd dose" & Tube == "HEP"), name1 = "Naive",
data2 = subset(mergedData, Prior.COVID.infection. == 'Yes' & timeCategory == "Post 2nd dose" & Tube == "HEP"), name2 = "Experienced",
xData = "AIM_CD4.CD69.CD200._FreqParent", yData = "FCActivCD8_Vax1", fillParam = "Prior.COVID.infection.", title = "Vaccine dose 2",
xLabel = "FC_AIMCD4_69200", yLabel = "Fold-change ICOS+CD38+ cTfh", nonparam = T) #+ scale_y_continuous(breaks=seq(0,30,1), limits = c(0,6) ) + scale_x_continuous(limits = c(20,70))
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 14 rows containing non-finite values (stat_smooth).
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 9 rows containing non-finite values (stat_smooth).
## Warning: Removed 14 rows containing missing values (geom_point).
## Warning: Removed 9 rows containing missing values (geom_point).
# ggsave(filename = "./Images/Age_correl_FCtfh_Vax2.pdf", width=8)
subsetData <- subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 2nd dose")
subsetData <- subsetData[,grep(paste(c("^FC", "Age"), collapse = "|"), names(subsetData))]
temp <- names(subsetData) ; temp <- do.call(rbind.data.frame, strsplit(temp, split = "_"))
# subsetData <- subsetData[, -grep("SampleID",names(subsetData))]
subsetData <- subsetData[, -grep("Btet", names(subsetData))]
cor.AIM <- cor(subsetData, method="kendall" , use="pairwise.complete.obs" )
cor.AIM.pmat <- ggcorrplot::cor_pmat(subsetData, method="kendall", use="pairwise.complete.obs" )
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
ggcorrplot::ggcorrplot(corr = cor.AIM, p.mat = cor.AIM.pmat, title = "AIM post 2nd dose", legend.title = "Kendall tau", tl.cex = 10,pch.cex = 1, insig = "blank")
# ggsave(filename = "./Images/AIM_ggcorrplot_Naive_post2nd.pdf")
ggcorrplot::ggcorrplot(corr = cor.AIM, p.mat = cor.AIM.pmat, title = "AIM post 2nd dose", legend.title = "Kendall tau", tl.cex = 18,pch.cex = 1) #, insig = "blank"
# ggsave(filename = "./Images/AIM_ggcorrplot_Naive_post2nd_full.pdf")
subsetData <- subset(mergedData, Prior.COVID.infection. == 'Yes' & timeCategory == "Post 2nd dose")
subsetData <- subsetData[,grep("^AIM_", names(subsetData))]
temp <- names(subsetData) ; temp <- do.call(rbind.data.frame, strsplit(temp, split = "_"))
subsetData <- subsetData[, -grep("SampleID",names(subsetData))]
cor.AIM <- cor(subsetData, method="kendall" , use="pairwise.complete.obs" )
cor.AIM.pmat <- ggcorrplot::cor_pmat(subsetData, method="kendall", use="pairwise.complete.obs" )
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
ggcorrplot::ggcorrplot(corr = cor.AIM, p.mat = cor.AIM.pmat, title = "AIM post 2nd dose", legend.title = "Kendall tau", tl.cex = 18,pch.cex = 1, insig = "blank")
# ggsave(filename = "./Images/AIM_ggcorrplot_Exp_post2nd.pdf")
ggcorrplot::ggcorrplot(corr = cor.AIM, p.mat = cor.AIM.pmat, title = "AIM post 2nd dose", legend.title = "Kendall tau", tl.cex = 18,pch.cex = 1) #, insig = "blank"
# ggsave(filename = "./Images/AIM_ggcorrplot_Exp_post2nd_full.pdf")
—————— B tetramer analyses ————————–
subsetData <- subset(mergedData, timeCategory == "Baseline")
twoSampleBar(data = subsetData, xData = "Prior.COVID.infection.", yData = "Btet_RBD_FreqParent", fillParam = "Prior.COVID.infection.", title = "Baseline",
yLabel = "RBD+ (% CD19)", nonparam = T)
## Warning: Removed 16 rows containing missing values (position_quasirandom).
# ggsave(filename = "./Images/Btet_frequency_baseline.pdf", width=5)
twoSampleBar(data = subsetData, xData = "Prior.COVID.infection.", yData = "Btet_RBDhiIgDloIgGhi", fillParam = "Prior.COVID.infection.", title = "Baseline",
yLabel = "IgG+ IgD- (% RBD)", nonparam = T)
## Warning: Removed 16 rows containing missing values (position_quasirandom).
# ggsave(filename = "./Images/Btet_IgGhi_baseline.pdf", width=5)
subsetData <- subset(mergedData, timeCategory != "two Weeks"& timeCategory != "2 wks post 2nd dose")
prePostTime(subsetData, xData = "timeCategory", yData="Btet_RBD_FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "RBD-reactive B cells",
xLabel = " ", yLabel = "RBD+ (% CD19)", repMeasures = F, exponential=F, newform = T) + scale_y_continuous(trans = "log10", limits = c(0.02, 5))
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Removed 79 row(s) containing missing values (geom_path).
## Warning: Removed 82 rows containing missing values (geom_point).
# ggsave(filename = "./Images/Btet_frequency_overTime.pdf")
bartlett.test(Btet_RBD_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
##
## Bartlett test of homogeneity of variances
##
## data: Btet_RBD_FreqParent by timeCategory
## Bartlett's K-squared = 13.528, df = 4, p-value = 0.008964
kruskal_test(formula = Btet_RBD_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 Btet_RBD_FreqParent 102 12.1 4 0.0167 Kruskal-Wallis
dunn_test(Btet_RBD_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 Btet_RB~ Baseline "Post 1s~ 11 11 0.280 0.780 1 ns
## 2 Btet_RB~ Baseline "Pre 2nd~ 11 11 0.599 0.549 1 ns
## 3 Btet_RB~ Baseline "Post 2n~ 11 11 2.81 0.00496 0.0496 *
## 4 Btet_RB~ Baseline "One mon~ 11 11 2.10 0.0354 0.248 ns
## 5 Btet_RB~ Post 1s~ "Pre 2nd~ 11 11 0.320 0.749 1 ns
## 6 Btet_RB~ Post 1s~ "Post 2n~ 11 11 2.53 0.0114 0.103 ns
## 7 Btet_RB~ Post 1s~ "One mon~ 11 11 1.82 0.0681 0.409 ns
## 8 Btet_RB~ Pre 2nd~ "Post 2n~ 11 11 2.21 0.0271 0.217 ns
## 9 Btet_RB~ Pre 2nd~ "One mon~ 11 11 1.50 0.132 0.662 ns
## 10 Btet_RB~ Post 2n~ "One mon~ 11 11 -0.706 0.480 1 ns
bartlett.test(Btet_RBD_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
##
## Bartlett test of homogeneity of variances
##
## data: Btet_RBD_FreqParent by timeCategory
## Bartlett's K-squared = 38.181, df = 4, p-value = 1.028e-07
kruskal_test(formula = Btet_RBD_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 Btet_RBD_FreqParent 74 12.7 4 0.0126 Kruskal-Wallis
dunn_test(Btet_RBD_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 Btet_RB~ Baseline "Post 1s~ 9 9 1.24 0.215 1 ns
## 2 Btet_RB~ Baseline "Pre 2nd~ 9 8 2.56 0.0105 0.0944 ns
## 3 Btet_RB~ Baseline "Post 2n~ 9 9 3.19 0.00144 0.0144 *
## 4 Btet_RB~ Baseline "One mon~ 9 9 2.34 0.0192 0.154 ns
## 5 Btet_RB~ Post 1s~ "Pre 2nd~ 9 8 1.36 0.175 1 ns
## 6 Btet_RB~ Post 1s~ "Post 2n~ 9 9 1.95 0.0516 0.361 ns
## 7 Btet_RB~ Post 1s~ "One mon~ 9 9 1.10 0.271 1 ns
## 8 Btet_RB~ Pre 2nd~ "Post 2n~ 8 9 0.531 0.595 1 ns
## 9 Btet_RB~ Pre 2nd~ "One mon~ 8 9 -0.288 0.773 1 ns
## 10 Btet_RB~ Post 2n~ "One mon~ 9 9 -0.845 0.398 1 ns
subsetData <- subset(mergedData, timeCategory == "Baseline" | timeCategory == "Post 2nd dose")
FC_response2 <- dcast( subsetData, `Record.ID`+`Alias` + `Prior.COVID.infection.` ~`timeCategory`, value.var = c("Btet_RBD_FreqParent"))
FC_response2$FoldChange <- FC_response2$`Post 2nd dose`/FC_response2$`Baseline`; FC_response2$Cohort <- NULL
FC_response2 <- FC_response2[!is.infinite(FC_response2$FoldChange), ]
FC_response2 %>% group_by(Prior.COVID.infection.) %>% get_summary_stats(type = "common")
## # A tibble: 6 x 11
## Prior.COVID.inf~ variable n min max median iqr mean sd se
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 No Baseline 9 0.014 0.19 0.067 0.054 0.072 0.052 0.017
## 2 No FoldCha~ 9 0.447 13.6 2.88 2.51 4.02 4.27 1.42
## 3 No Post 2n~ 9 0.062 0.35 0.12 0.149 0.167 0.101 0.034
## 4 Yes Baseline 9 0.039 0.24 0.12 0.064 0.119 0.065 0.022
## 5 Yes FoldCha~ 9 0.786 10.2 4.83 4.5 4.65 3.05 1.02
## 6 Yes Post 2n~ 9 0.11 2.44 0.26 0.21 0.593 0.742 0.247
## # ... with 1 more variable: ci <dbl>
FC_response2 %>% wilcox_test(FoldChange ~ Prior.COVID.infection.)
## # A tibble: 1 x 7
## .y. group1 group2 n1 n2 statistic p
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl>
## 1 FoldChange No Yes 19 15 31 0.436
subsetData <- subset(mergedData, timeCategory != "two Weeks"& timeCategory != "2 wks post 2nd dose");
prePostTime(subsetData, xData = "timeCategory", yData="Btet_RBD_FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "RBD-reactive B cells",
xLabel = " ", yLabel = "RBD+ (% CD19)", repMeasures = F, exponential=F, newform = T, recentCOVID = T) + scale_y_continuous(trans = "log10", limits = c(0.02, 5))
## [1] "block3.1 recentCOVID"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Removed 79 row(s) containing missing values (geom_path).
## Warning: Removed 82 rows containing missing values (geom_point).
# ggsave(filename = "./Images/Btet_frequency_overTime_recentCOVID.pdf")
prePostTime(subsetData, xData = "timeCategory", yData="Btet_RBDhiIgDloIgGhi", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "Switched RBD+ B cells",
xLabel = " ", yLabel = "IgG+ IgD- (% RBD+)", repMeasures = F, exponential=F, newform = T) + scale_y_continuous(breaks=seq(0,100,25), limits = c(0,125))
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Removed 77 row(s) containing missing values (geom_path).
## Warning: Removed 77 rows containing missing values (geom_point).
# ggsave(filename = "./Images/Btet_IgGhi_overTime.pdf")
bartlett.test(Btet_RBDhiIgDloIgGhi ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
##
## Bartlett test of homogeneity of variances
##
## data: Btet_RBDhiIgDloIgGhi by timeCategory
## Bartlett's K-squared = 57.985, df = 4, p-value = 7.688e-12
kruskal_test(formula = Btet_RBDhiIgDloIgGhi ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 Btet_RBDhiIgDloIgGhi 102 23.5 4 0.000101 Kruskal-Wallis
dunn_test(Btet_RBDhiIgDloIgGhi ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 Btet_RB~ Baseli~ "Post 1s~ 11 11 -1.06 2.88e-1 8.64e-1 ns
## 2 Btet_RB~ Baseli~ "Pre 2nd~ 11 11 0.643 5.20e-1 8.64e-1 ns
## 3 Btet_RB~ Baseli~ "Post 2n~ 11 11 3.17 1.50e-3 1.20e-2 *
## 4 Btet_RB~ Baseli~ "One mon~ 11 11 2.28 2.26e-2 1.36e-1 ns
## 5 Btet_RB~ Post 1~ "Pre 2nd~ 11 11 1.71 8.80e-2 4.40e-1 ns
## 6 Btet_RB~ Post 1~ "Post 2n~ 11 11 4.24 2.26e-5 2.26e-4 ***
## 7 Btet_RB~ Post 1~ "One mon~ 11 11 3.34 8.31e-4 7.48e-3 **
## 8 Btet_RB~ Pre 2n~ "Post 2n~ 11 11 2.53 1.14e-2 7.96e-2 ns
## 9 Btet_RB~ Pre 2n~ "One mon~ 11 11 1.64 1.02e-1 4.40e-1 ns
## 10 Btet_RB~ Post 2~ "One mon~ 11 11 -0.895 3.71e-1 8.64e-1 ns
bartlett.test(Btet_RBDhiIgDloIgGhi ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
##
## Bartlett test of homogeneity of variances
##
## data: Btet_RBDhiIgDloIgGhi by timeCategory
## Bartlett's K-squared = 2.741, df = 4, p-value = 0.6021
tukey_hsd( aov(Btet_RBDhiIgDloIgGhi ~ timeCategory, data = subset(subsetData, Prior.COVID.infection. == 'Yes')))
## # A tibble: 10 x 9
## term group1 group2 null.value estimate conf.low conf.high p.adj p.adj.signif
## * <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 time~ Basel~ "Post~ 0 5.13 -21.6 31.9 0.982 ns
## 2 time~ Basel~ "Pre ~ 0 12.8 -14.9 40.4 0.68 ns
## 3 time~ Basel~ "Post~ 0 19.6 -7.15 46.4 0.242 ns
## 4 time~ Basel~ "One ~ 0 19.8 -6.93 46.6 0.233 ns
## 5 time~ Post ~ "Pre ~ 0 7.62 -20.0 35.2 0.932 ns
## 6 time~ Post ~ "Post~ 0 14.5 -12.3 41.3 0.538 ns
## 7 time~ Post ~ "One ~ 0 14.7 -12.1 41.5 0.524 ns
## 8 time~ Pre 2~ "Post~ 0 6.88 -20.7 34.5 0.952 ns
## 9 time~ Pre 2~ "One ~ 0 7.09 -20.5 34.7 0.947 ns
## 10 time~ Post ~ "One ~ 0 0.217 -26.6 27.0 1 ns
# kruskal_test(formula = Btet_RBDhiIgDloIgGhi ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
# dunn_test(Btet_RBDhiIgDloIgGhi ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
prePostTime(subsetData, xData = "timeCategory", yData="Btet_RBDhiIgDloIgGhi", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "Switched RBD+ B cells",
xLabel = " ", yLabel = "IgG+ IgD- (% RBD+)", repMeasures = F, exponential=F, newform = T, recentCOVID = T) + scale_y_continuous(breaks=seq(0,100,25), limits = c(0,125))
## [1] "block3.1 recentCOVID"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Removed 77 row(s) containing missing values (geom_path).
## Warning: Removed 77 rows containing missing values (geom_point).
# ggsave(filename = "./Images/Btet_IgGhi_overTime_recentCOVID.pdf")
prePostTime(subsetData, xData = "timeCategory", yData="Btet_RBDhi_DN2_FreqCD19", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "DN2 RBD+ B cells",
xLabel = " ", yLabel = "DN2 B cells (% CD19+)", repMeasures = F, exponential=F, newform = T) + scale_y_continuous(limits = c(0.001,3), trans = "log10")
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Removed 77 row(s) containing missing values (geom_path).
## Warning: Removed 77 rows containing missing values (geom_point).
# ggsave(filename = "./Images/Btet_DN2_overTime_fullPlot.pdf")
bartlett.test(Btet_RBDhi_DN2_FreqCD19 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
##
## Bartlett test of homogeneity of variances
##
## data: Btet_RBDhi_DN2_FreqCD19 by timeCategory
## Bartlett's K-squared = Inf, df = 4, p-value < 2.2e-16
kruskal_test(formula = Btet_RBDhi_DN2_FreqCD19 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 Btet_RBDhi_DN2_FreqCD19 102 21.7 4 0.000233 Kruskal-Wallis
dunn_test(Btet_RBDhi_DN2_FreqCD19 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 Btet_RB~ Baseli~ "Post 1s~ 11 11 -0.431 6.67e-1 1 ns
## 2 Btet_RB~ Baseli~ "Pre 2nd~ 11 11 0.268 7.89e-1 1 ns
## 3 Btet_RB~ Baseli~ "Post 2n~ 11 11 3.43 6.04e-4 0.00544 **
## 4 Btet_RB~ Baseli~ "One mon~ 11 11 2.18 2.94e-2 0.176 ns
## 5 Btet_RB~ Post 1~ "Pre 2nd~ 11 11 0.699 4.85e-1 1 ns
## 6 Btet_RB~ Post 1~ "Post 2n~ 11 11 3.86 1.13e-4 0.00113 **
## 7 Btet_RB~ Post 1~ "One mon~ 11 11 2.61 9.08e-3 0.0636 ns
## 8 Btet_RB~ Pre 2n~ "Post 2n~ 11 11 3.16 1.57e-3 0.0126 *
## 9 Btet_RB~ Pre 2n~ "One mon~ 11 11 1.91 5.61e-2 0.281 ns
## 10 Btet_RB~ Post 2~ "One mon~ 11 11 -1.25 2.11e-1 0.843 ns
bartlett.test(Btet_RBDhi_DN2_FreqCD19 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
##
## Bartlett test of homogeneity of variances
##
## data: Btet_RBDhi_DN2_FreqCD19 by timeCategory
## Bartlett's K-squared = 83.687, df = 4, p-value < 2.2e-16
kruskal_test(formula = Btet_RBDhi_DN2_FreqCD19 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 Btet_RBDhi_DN2_FreqCD19 74 13.4 4 0.00928 Kruskal-Wallis
dunn_test(Btet_RBDhi_DN2_FreqCD19 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 Btet_RBD~ Baseli~ "Post 1s~ 9 9 0.789 0.430 1 ns
## 2 Btet_RBD~ Baseli~ "Pre 2nd~ 9 8 2.23 0.0260 0.208 ns
## 3 Btet_RBD~ Baseli~ "Post 2n~ 9 9 2.81 0.00489 0.0441 *
## 4 Btet_RBD~ Baseli~ "One mon~ 9 9 2.91 0.00363 0.0363 *
## 5 Btet_RBD~ Post 1~ "Pre 2nd~ 9 8 1.46 0.144 0.721 ns
## 6 Btet_RBD~ Post 1~ "Post 2n~ 9 9 2.02 0.0429 0.257 ns
## 7 Btet_RBD~ Post 1~ "One mon~ 9 9 2.12 0.0340 0.238 ns
## 8 Btet_RBD~ Pre 2n~ "Post 2n~ 8 9 0.504 0.614 1 ns
## 9 Btet_RBD~ Pre 2n~ "One mon~ 8 9 0.596 0.551 1 ns
## 10 Btet_RBD~ Post 2~ "One mon~ 9 9 0.0951 0.924 1 ns
prePostTime(subsetData, xData = "timeCategory", yData="Btet_RBD_CD71._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "CD71+ RBD+ B cells",
xLabel = " ", yLabel = "CD71+ IgDlo (% RBD+)", repMeasures = F, exponential=F, newform = T) + scale_y_continuous(breaks=seq(0,100,20), trans = "identity", limits = c(0, 100))
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Removed 77 row(s) containing missing values (geom_path).
## Warning: Removed 77 rows containing missing values (geom_point).
# ggsave(filename = "./Images/Btet_CD71_overTime.pdf")
bartlett.test(Btet_RBD_CD71._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
##
## Bartlett test of homogeneity of variances
##
## data: Btet_RBD_CD71._FreqParent by timeCategory
## Bartlett's K-squared = 32.531, df = 4, p-value = 1.49e-06
kruskal_test(formula = Btet_RBD_CD71._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 Btet_RBD_CD71._FreqParent 102 12.1 4 0.0166 Kruskal-Wallis
dunn_test(Btet_RBD_CD71._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 Btet_RB~ Baseline "Post 1~ 11 11 0.927 3.54e-1 1 ns
## 2 Btet_RB~ Baseline "Pre 2n~ 11 11 0.996 3.19e-1 1 ns
## 3 Btet_RB~ Baseline "Post 2~ 11 11 3.32 8.98e-4 0.00898 **
## 4 Btet_RB~ Baseline "One mo~ 11 11 1.55 1.21e-1 0.724 ns
## 5 Btet_RB~ Post 1s~ "Pre 2n~ 11 11 0.0695 9.45e-1 1 ns
## 6 Btet_RB~ Post 1s~ "Post 2~ 11 11 2.39 1.67e-2 0.150 ns
## 7 Btet_RB~ Post 1s~ "One mo~ 11 11 0.626 5.32e-1 1 ns
## 8 Btet_RB~ Pre 2nd~ "Post 2~ 11 11 2.32 2.01e-2 0.161 ns
## 9 Btet_RB~ Pre 2nd~ "One mo~ 11 11 0.556 5.78e-1 1 ns
## 10 Btet_RB~ Post 2n~ "One mo~ 11 11 -1.77 7.70e-2 0.539 ns
bartlett.test(Btet_RBD_CD71._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
##
## Bartlett test of homogeneity of variances
##
## data: Btet_RBD_CD71._FreqParent by timeCategory
## Bartlett's K-squared = 42.502, df = 4, p-value = 1.313e-08
kruskal_test(formula = Btet_RBD_CD71._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 Btet_RBD_CD71._FreqParent 74 14.0 4 0.00724 Kruskal-Wallis
dunn_test(Btet_RBD_CD71._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 Btet_RBD~ Baseli~ "Post 1s~ 9 9 3.07 0.00215 0.0215 *
## 2 Btet_RBD~ Baseli~ "Pre 2nd~ 9 8 2.55 0.0107 0.0963 ns
## 3 Btet_RBD~ Baseli~ "Post 2n~ 9 9 2.27 0.0234 0.164 ns
## 4 Btet_RBD~ Baseli~ "One mon~ 9 9 0.625 0.532 1 ns
## 5 Btet_RBD~ Post 1~ "Pre 2nd~ 9 8 -0.424 0.672 1 ns
## 6 Btet_RBD~ Post 1~ "Post 2n~ 9 9 -0.802 0.423 1 ns
## 7 Btet_RBD~ Post 1~ "One mon~ 9 9 -2.44 0.0146 0.116 ns
## 8 Btet_RBD~ Pre 2n~ "Post 2n~ 8 9 -0.354 0.723 1 ns
## 9 Btet_RBD~ Pre 2n~ "One mon~ 8 9 -1.95 0.0516 0.310 ns
## 10 Btet_RBD~ Post 2~ "One mon~ 9 9 -1.64 0.101 0.504 ns
prePostTime(subsetData, xData = "timeCategory", yData="Btet_RBD_CD21lo_FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "CD21lo RBD+ B cells",
xLabel = " ", yLabel = "CD21lo (% RBD+)", repMeasures = F, exponential=F, newform = T) + scale_y_continuous(trans="pseudo_log", limits = c(0,100), breaks = c(0,1,10,25,50,100))
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Removed 77 row(s) containing missing values (geom_path).
## Warning: Removed 77 rows containing missing values (geom_point).
# scale_y_continuous(breaks=seq(0,100,10), trans = "identity", limits = c(0,60))
# ggsave(filename = "./Images/Btet_CD21lo_overTime.pdf")
bartlett.test(Btet_RBD_CD21lo_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
##
## Bartlett test of homogeneity of variances
##
## data: Btet_RBD_CD21lo_FreqParent by timeCategory
## Bartlett's K-squared = 28.345, df = 4, p-value = 1.062e-05
kruskal_test(formula = Btet_RBD_CD21lo_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 Btet_RBD_CD21lo_FreqParent 102 8.51 4 0.0745 Kruskal-Wallis
dunn_test(Btet_RBD_CD21lo_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 Btet_RBD_~ Baseli~ "Post 1st~ 11 11 -0.0921 0.927 1 ns
## 2 Btet_RBD_~ Baseli~ "Pre 2nd ~ 11 11 0.516 0.606 1 ns
## 3 Btet_RBD_~ Baseli~ "Post 2nd~ 11 11 2.44 0.0147 0.132 ns
## 4 Btet_RBD_~ Baseli~ "One mont~ 11 11 0.405 0.685 1 ns
## 5 Btet_RBD_~ Post 1~ "Pre 2nd ~ 11 11 0.608 0.543 1 ns
## 6 Btet_RBD_~ Post 1~ "Post 2nd~ 11 11 2.53 0.0113 0.113 ns
## 7 Btet_RBD_~ Post 1~ "One mont~ 11 11 0.497 0.619 1 ns
## 8 Btet_RBD_~ Pre 2n~ "Post 2nd~ 11 11 1.92 0.0543 0.380 ns
## 9 Btet_RBD_~ Pre 2n~ "One mont~ 11 11 -0.110 0.912 1 ns
## 10 Btet_RBD_~ Post 2~ "One mont~ 11 11 -2.04 0.0418 0.335 ns
bartlett.test(Btet_RBD_CD21lo_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
##
## Bartlett test of homogeneity of variances
##
## data: Btet_RBD_CD21lo_FreqParent by timeCategory
## Bartlett's K-squared = 19.979, df = 4, p-value = 0.0005043
kruskal_test(formula = Btet_RBD_CD21lo_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 Btet_RBD_CD21lo_FreqParent 74 2.64 4 0.619 Kruskal-Wallis
dunn_test(Btet_RBD_CD21lo_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 Btet_RBD_~ Baseline "Post 1st~ 9 9 0.265 0.791 1 ns
## 2 Btet_RBD_~ Baseline "Pre 2nd ~ 9 8 0.803 0.422 1 ns
## 3 Btet_RBD_~ Baseline "Post 2nd~ 9 9 0.834 0.404 1 ns
## 4 Btet_RBD_~ Baseline "One mont~ 9 9 -0.539 0.590 1 ns
## 5 Btet_RBD_~ Post 1s~ "Pre 2nd ~ 9 8 0.546 0.585 1 ns
## 6 Btet_RBD_~ Post 1s~ "Post 2nd~ 9 9 0.569 0.569 1 ns
## 7 Btet_RBD_~ Post 1s~ "One mont~ 9 9 -0.804 0.421 1 ns
## 8 Btet_RBD_~ Pre 2nd~ "Post 2nd~ 8 9 0.00595 0.995 1 ns
## 9 Btet_RBD_~ Pre 2nd~ "One mont~ 8 9 -1.33 0.185 1 ns
## 10 Btet_RBD_~ Post 2n~ "One mont~ 9 9 -1.37 0.170 1 ns
prePostTime(subsetData, xData = "timeCategory", yData="Btet_RBD_CD24lo_FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "CD24lo RBD+ B cells",
xLabel = " ", yLabel = "CD24lo (% RBD+)", repMeasures = F, exponential=F, newform = T) + scale_y_continuous(breaks=seq(0,100,20), trans = "identity", limits = c(0, 120))
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Removed 77 row(s) containing missing values (geom_path).
## Warning: Removed 77 rows containing missing values (geom_point).
# ggsave(filename = "./Images/Btet_CD24lo_overTime.pdf")
bartlett.test(Btet_RBD_CD24lo_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
##
## Bartlett test of homogeneity of variances
##
## data: Btet_RBD_CD24lo_FreqParent by timeCategory
## Bartlett's K-squared = 12.128, df = 4, p-value = 0.01643
kruskal_test(formula = Btet_RBD_CD24lo_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 Btet_RBD_CD24lo_FreqParent 102 22.0 4 0.000201 Kruskal-Wallis
dunn_test(Btet_RBD_CD24lo_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 Btet_RB~ Baseli~ "Post 1s~ 11 11 1.05 2.92e-1 1.00e+0 ns
## 2 Btet_RB~ Baseli~ "Pre 2nd~ 11 11 2.05 3.99e-2 2.10e-1 ns
## 3 Btet_RB~ Baseli~ "Post 2n~ 11 11 4.47 7.76e-6 7.76e-5 ****
## 4 Btet_RB~ Baseli~ "One mon~ 11 11 2.11 3.49e-2 2.10e-1 ns
## 5 Btet_RB~ Post 1~ "Pre 2nd~ 11 11 1.00 3.17e-1 1.00e+0 ns
## 6 Btet_RB~ Post 1~ "Post 2n~ 11 11 3.42 6.33e-4 5.69e-3 **
## 7 Btet_RB~ Post 1~ "One mon~ 11 11 1.05 2.92e-1 1.00e+0 ns
## 8 Btet_RB~ Pre 2n~ "Post 2n~ 11 11 2.42 1.56e-2 1.25e-1 ns
## 9 Btet_RB~ Pre 2n~ "One mon~ 11 11 0.0548 9.56e-1 1.00e+0 ns
## 10 Btet_RB~ Post 2~ "One mon~ 11 11 -2.36 1.81e-2 1.27e-1 ns
bartlett.test(Btet_RBD_CD24lo_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
##
## Bartlett test of homogeneity of variances
##
## data: Btet_RBD_CD24lo_FreqParent by timeCategory
## Bartlett's K-squared = 4.7743, df = 4, p-value = 0.3113
tukey_hsd( aov(Btet_RBD_CD24lo_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes')) )
## # A tibble: 10 x 9
## term group1 group2 null.value estimate conf.low conf.high p.adj
## * <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 time~ Basel~ "Post~ 0 26.7 -1.50 54.9 0.071
## 2 time~ Basel~ "Pre ~ 0 21.6 -7.44 50.7 0.229
## 3 time~ Basel~ "Post~ 0 34.1 5.92 62.3 0.0109
## 4 time~ Basel~ "One ~ 0 22.9 -5.28 51.1 0.159
## 5 time~ Post ~ "Pre ~ 0 -5.07 -34.1 24.0 0.987
## 6 time~ Post ~ "Post~ 0 7.42 -20.8 35.6 0.942
## 7 time~ Post ~ "One ~ 0 -3.78 -32.0 24.4 0.995
## 8 time~ Pre 2~ "Post~ 0 12.5 -16.6 41.6 0.735
## 9 time~ Pre 2~ "One ~ 0 1.29 -27.8 30.4 1
## 10 time~ Post ~ "One ~ 0 -11.2 -39.4 17.0 0.787
## # ... with 1 more variable: p.adj.signif <chr>
subsetData$Btet_RBDhi_mfiRBD <- str_replace(pattern = "n/a", replacement = "", string = subsetData$Btet_RBDhi_mfiRBD)
subsetData$Btet_RBDhi_mfiRBD <- as.numeric(subsetData$Btet_RBDhi_mfiRBD)
prePostTime(subsetData, xData = "timeCategory", yData="Btet_RBDhi_mfiRBD", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "RBD+ B cells",
xLabel = " ", yLabel = "MFI RBD", repMeasures = F, exponential=F, newform = T) + scale_y_continuous( trans = "log10")
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Removed 79 row(s) containing missing values (geom_path).
## Warning: Removed 80 rows containing missing values (geom_point).
# ggsave(filename = "./Images/Btet_9_overTime.pdf")
bartlett.test(Btet_RBDhi_mfiRBD ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
##
## Bartlett test of homogeneity of variances
##
## data: Btet_RBDhi_mfiRBD by timeCategory
## Bartlett's K-squared = 79.249, df = 4, p-value = 2.512e-16
kruskal_test(formula = Btet_RBDhi_mfiRBD ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 Btet_RBDhi_mfiRBD 102 6.94 4 0.139 Kruskal-Wallis
dunn_test(Btet_RBDhi_mfiRBD ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 Btet_RBD~ Baseli~ "Post 1st ~ 9 10 0.464 0.642 1 ns
## 2 Btet_RBD~ Baseli~ "Pre 2nd d~ 9 11 0.489 0.625 1 ns
## 3 Btet_RBD~ Baseli~ "Post 2nd ~ 9 11 2.17 0.0299 0.299 ns
## 4 Btet_RBD~ Baseli~ "One month~ 9 11 1.65 0.0988 0.692 ns
## 5 Btet_RBD~ Post 1~ "Pre 2nd d~ 10 11 0.0151 0.988 1 ns
## 6 Btet_RBD~ Post 1~ "Post 2nd ~ 10 11 1.74 0.0810 0.687 ns
## 7 Btet_RBD~ Post 1~ "One month~ 10 11 1.21 0.226 1 ns
## 8 Btet_RBD~ Pre 2n~ "Post 2nd ~ 11 11 1.77 0.0763 0.687 ns
## 9 Btet_RBD~ Pre 2n~ "One month~ 11 11 1.22 0.221 1 ns
## 10 Btet_RBD~ Post 2~ "One month~ 11 11 -0.549 0.583 1 ns
bartlett.test(Btet_RBDhi_mfiRBD ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
##
## Bartlett test of homogeneity of variances
##
## data: Btet_RBDhi_mfiRBD by timeCategory
## Bartlett's K-squared = 7.0015, df = 4, p-value = 0.1358
tukey_hsd( aov(Btet_RBDhi_mfiRBD ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes')) )
## # A tibble: 10 x 9
## term group1 group2 null.value estimate conf.low conf.high p.adj p.adj.signif
## * <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 time~ Basel~ "Post~ 0 1967. -15839. 19773. 0.998 ns
## 2 time~ Basel~ "Pre ~ 0 11751. -6603. 30105. 0.371 ns
## 3 time~ Basel~ "Post~ 0 15713. -2093. 33519. 0.106 ns
## 4 time~ Basel~ "One ~ 0 13816. -3990. 31621. 0.194 ns
## 5 time~ Post ~ "Pre ~ 0 9784. -8570. 28137. 0.553 ns
## 6 time~ Post ~ "Post~ 0 13746. -4060. 31552. 0.198 ns
## 7 time~ Post ~ "One ~ 0 11848. -5957. 29654. 0.333 ns
## 8 time~ Pre 2~ "Post~ 0 3962. -14391. 22316. 0.971 ns
## 9 time~ Pre 2~ "One ~ 0 2065. -16289. 20418. 0.998 ns
## 10 time~ Post ~ "One ~ 0 -1898. -19703. 15908. 0.998 ns
subsetData$Btet_RBDhiIgDloIgGhi_mfiRBD <- str_replace(pattern = "n/a", replacement = "", string = subsetData$Btet_RBDhiIgDloIgGhi_mfiRBD)
subsetData$Btet_RBDhiIgDloIgGhi_mfiRBD <- as.numeric(subsetData$Btet_RBDhiIgDloIgGhi_mfiRBD)
prePostTime(subsetData, xData = "timeCategory", yData="Btet_RBDhiIgDloIgGhi_mfiRBD", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "RBD+ B cells",
xLabel = " ", yLabel = "MFI RBD", repMeasures = F, exponential=F, newform = T) + scale_y_continuous( trans = "log10")
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Removed 100 row(s) containing missing values (geom_path).
## Warning: Removed 107 rows containing missing values (geom_point).
# ggsave(filename = "./Images/Btet_0_overTime.pdf")
# bartlett.test(Btet_RBDhiIgDloIgGhi_mfiRBD ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
kruskal_test(formula = Btet_RBDhiIgDloIgGhi_mfiRBD ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 Btet_RBDhiIgDloIgGhi_mfiRBD 102 8.55 4 0.0735 Kruskal-Wallis
dunn_test(Btet_RBDhiIgDloIgGhi_mfiRBD ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 Btet_RBD~ Baseli~ "Post 1s~ 4 1 0.508 0.611 1 ns
## 2 Btet_RBD~ Baseli~ "Pre 2nd~ 4 6 1.58 0.113 0.906 ns
## 3 Btet_RBD~ Baseli~ "Post 2n~ 4 10 2.46 0.0140 0.126 ns
## 4 Btet_RBD~ Baseli~ "One mon~ 4 9 2.69 0.00718 0.0718 ns
## 5 Btet_RBD~ Post 1~ "Pre 2nd~ 1 6 0.421 0.674 1 ns
## 6 Btet_RBD~ Post 1~ "Post 2n~ 1 10 0.845 0.398 1 ns
## 7 Btet_RBD~ Post 1~ "One mon~ 1 9 0.994 0.320 1 ns
## 8 Btet_RBD~ Pre 2n~ "Post 2n~ 6 10 0.836 0.403 1 ns
## 9 Btet_RBD~ Pre 2n~ "One mon~ 6 9 1.13 0.260 1 ns
## 10 Btet_RBD~ Post 2~ "One mon~ 10 9 0.352 0.725 1 ns
bartlett.test(Btet_RBDhiIgDloIgGhi_mfiRBD ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
##
## Bartlett test of homogeneity of variances
##
## data: Btet_RBDhiIgDloIgGhi_mfiRBD by timeCategory
## Bartlett's K-squared = 4.5451, df = 4, p-value = 0.3372
tukey_hsd( aov(Btet_RBDhiIgDloIgGhi_mfiRBD ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes')) )
## # A tibble: 10 x 9
## term group1 group2 null.value estimate conf.low conf.high p.adj p.adj.signif
## * <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 time~ Basel~ "Post~ 0 18618. -18661. 55897. 0.608 ns
## 2 time~ Basel~ "Pre ~ 0 22629. -16272. 61529. 0.462 ns
## 3 time~ Basel~ "Post~ 0 19499. -15501. 54499. 0.505 ns
## 4 time~ Basel~ "One ~ 0 24289. -10711. 59289. 0.289 ns
## 5 time~ Post ~ "Pre ~ 0 4011. -36063. 44085. 0.998 ns
## 6 time~ Post ~ "Post~ 0 881. -35419. 37180. 1 ns
## 7 time~ Post ~ "One ~ 0 5671. -30629. 41970. 0.991 ns
## 8 time~ Pre 2~ "Post~ 0 -3130. -41093. 34833. 0.999 ns
## 9 time~ Pre 2~ "One ~ 0 1660. -36303. 39623. 1 ns
## 10 time~ Post ~ "One ~ 0 4790. -29165. 38745. 0.994 ns
—————— Tfh analyses ————————–
# subsetData <- mergedData[which(mergedData$shortForm == "bL" | mergedData$shortForm == "oW"),]
# prePostTime(data = subsetData, xData = "shortForm", yData="CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID",
# title = "cTfh", xLabel = "Prior COVID?", yLabel = "ICOS+CD38+ (% cTfh)")
subsetData <- subset(mergedData, timeCategory != "two Weeks" & timeCategory != "2 wks post 2nd dose");
subsetData$timeCategory <- factor(subsetData$timeCategory, levels = c("Baseline", "Post 1st dose", "Pre 2nd dose", "Post 2nd dose","One month post\n2nd dose"))
prePostTime(subsetData, xData = "DPV", yData="CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "Tfh",
xLabel = "Prior COVID?", yLabel = "ICOS+CD38+ (% cTfh)", repMeasures = F, exponential=F) + geom_vline(xintercept = 0,linetype="dashed", alpha=0.5) + coord_cartesian(xlim = c(-1,12))
## [1] "block2"
## Warning: Removed 10 row(s) containing missing values (geom_path).
## Warning: Removed 11 rows containing missing values (geom_point).
subsetData$DPV <- subsetData$DPV - difftime(subsetData$Vaccine.2.date, subsetData$Vaccine.1.date, units="days" )
prePostTime(subsetData, xData = "DPV", yData="CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "Tfh",
xLabel = "Prior COVID?", yLabel = "ICOS+CD38+ (% cTfh)", repMeasures = F, exponential=F) + geom_vline(xintercept = 0,linetype="dashed", alpha=0.5) + coord_cartesian(xlim = c(-5,12))
## [1] "block2"
## Don't know how to automatically pick scale for object of type difftime. Defaulting to continuous.
## Warning: Removed 10 row(s) containing missing values (geom_path).
## Warning: Removed 11 rows containing missing values (geom_point).
prePostTime(subsetData, xData = "timeCategory", yData="CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "cTfh",
xLabel = " ", yLabel = "ICOS+CD38+ (% cTfh)", repMeasures = F, newform=T)
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Removed 10 row(s) containing missing values (geom_path).
## Warning: Removed 11 rows containing missing values (geom_point).
# ggsave(filename = "./Images/cTfh_responses_bothCohorts_overTime.pdf")
bartlett.test(CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
##
## Bartlett test of homogeneity of variances
##
## data: CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqParent by timeCategory
## Bartlett's K-squared = 0.22116, df = 4, p-value = 0.9943
tukey_hsd(aov(CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No')))
## # A tibble: 10 x 9
## term group1 group2 null.value estimate conf.low conf.high p.adj
## * <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 time~ Basel~ "Post~ 0 1.32 -1.10 3.74 5.53e-1
## 2 time~ Basel~ "Pre ~ 0 1.41 -1.04 3.86 4.99e-1
## 3 time~ Basel~ "Post~ 0 2.90 0.447 5.35 1.21e-2
## 4 time~ Basel~ "One ~ 0 4.15 1.63 6.66 1.34e-4
## 5 time~ Post ~ "Pre ~ 0 0.0899 -2.30 2.48 1.00e+0
## 6 time~ Post ~ "Post~ 0 1.57 -0.815 3.96 3.61e-1
## 7 time~ Post ~ "One ~ 0 2.83 0.369 5.28 1.58e-2
## 8 time~ Pre 2~ "Post~ 0 1.48 -0.934 3.90 4.34e-1
## 9 time~ Pre 2~ "One ~ 0 2.74 0.251 5.22 2.34e-2
## 10 time~ Post ~ "One ~ 0 1.25 -1.23 3.74 6.29e-1
## # ... with 1 more variable: p.adj.signif <chr>
bartlett.test(CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
##
## Bartlett test of homogeneity of variances
##
## data: CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqParent by timeCategory
## Bartlett's K-squared = 2.0152, df = 4, p-value = 0.733
tukey_hsd( aov(CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes')) )
## # A tibble: 10 x 9
## term group1 group2 null.value estimate conf.low conf.high p.adj p.adj.signif
## * <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 time~ Basel~ "Post~ 0 2.17 -3.14 7.47 0.78 ns
## 2 time~ Basel~ "Pre ~ 0 1.14 -4.25 6.54 0.975 ns
## 3 time~ Basel~ "Post~ 0 1.04 -4.27 6.34 0.982 ns
## 4 time~ Basel~ "One ~ 0 1.66 -3.65 6.96 0.904 ns
## 5 time~ Post ~ "Pre ~ 0 -1.02 -6.22 4.17 0.981 ns
## 6 time~ Post ~ "Post~ 0 -1.13 -6.22 3.96 0.971 ns
## 7 time~ Post ~ "One ~ 0 -0.511 -5.60 4.58 0.999 ns
## 8 time~ Pre 2~ "Post~ 0 -0.105 -5.30 5.09 1 ns
## 9 time~ Pre 2~ "One ~ 0 0.514 -4.68 5.71 0.999 ns
## 10 time~ Post ~ "One ~ 0 0.619 -4.47 5.71 0.997 ns
prePostTime(subsetData, xData = "timeCategory", yData="CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "cTfh",
xLabel = " ", yLabel = "ICOS+CD38+ (% cTfh)", repMeasures = F, newform=T, recentCOVID = T)
## [1] "block3.1 recentCOVID"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Removed 10 row(s) containing missing values (geom_path).
## Warning: Removed 11 rows containing missing values (geom_point).
# ggsave(filename = "./Images/cTfh_responses_bothCohorts_overTime_recentCOVID.pdf")
twoSampleBar(data = subset(mergedData, timeCategory == "Post 1st dose"), xData = "Prior.COVID.infection.", yData = "FCtfh_Vax1", fillParam = "Prior.COVID.infection.", title = "ICOS+CD38+ cTfh",
yLabel = "Fold-change at one week")
## Warning: Removed 5 rows containing missing values (position_quasirandom).
subsetData = subset(mergedData, mergedData$shortForm == 'oW')
subsetData %>% group_by(Prior.COVID.infection.) %>% shapiro_test(CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqParent)
## # A tibble: 2 x 4
## Prior.COVID.infection. variable statistic p
## <chr> <chr> <dbl> <dbl>
## 1 No CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqPa~ 0.961 0.529
## 2 Yes CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqPa~ 0.945 0.489
twoSampleBar(data=subsetData, xData = "Prior.COVID.infection.", yData="CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqParent", fillParam = "Prior.COVID.infection.", title = "cTfh at oneWeek",
yLabel = "ICOS+CD38+ (% cTfh)", nonparam = T) + scale_y_continuous(breaks = seq(0,21,3), limits = c(0,20))
## Warning: Removed 2 rows containing missing values (position_quasirandom).
subsetData <- subset(mergedData, timeCategory != "two Weeks" & timeCategory != "2 wks post 2nd dose");
subsetData$timeCategory <- factor(subsetData$timeCategory, levels = c("Baseline", "Post 1st dose", "Pre 2nd dose", "Post 2nd dose","One month post\n2nd dose"))
prePostTime(data = subsetData, xData = "timeCategory", yData="CD4_.Nonnaive.cTfh.ICOS..CD38...CXCR3._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "cTfh",
xLabel = " ", yLabel = "CXCR3+ (% ICOS+CD38+ cTfh)", repMeasures = F, newform = T) + scale_y_continuous(limits = c(0,80),breaks=seq(0,100,10))
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Removed 11 row(s) containing missing values (geom_path).
## Warning: Removed 12 rows containing missing values (geom_point).
# ggsave(filename = "./Images/cTfh_responses_CXCR3_bothCohorts_overTime.pdf")
bartlett.test(CD4_.Nonnaive.cTfh.ICOS..CD38...CXCR3._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
##
## Bartlett test of homogeneity of variances
##
## data: CD4_.Nonnaive.cTfh.ICOS..CD38...CXCR3._FreqParent by timeCategory
## Bartlett's K-squared = 7.3798, df = 4, p-value = 0.1171
tukey_hsd(aov(CD4_.Nonnaive.cTfh.ICOS..CD38...CXCR3._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No')))
## # A tibble: 10 x 9
## term group1 group2 null.value estimate conf.low conf.high p.adj
## * <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 time~ Basel~ "Post~ 0 8.16 -0.880 17.2 0.0969
## 2 time~ Basel~ "Pre ~ 0 10.2 1.04 19.3 0.0212
## 3 time~ Basel~ "Post~ 0 13.0 3.83 22.1 0.00142
## 4 time~ Basel~ "One ~ 0 5.24 -4.14 14.6 0.531
## 5 time~ Post ~ "Pre ~ 0 2.03 -6.89 10.9 0.969
## 6 time~ Post ~ "Post~ 0 4.81 -4.10 13.7 0.564
## 7 time~ Post ~ "One ~ 0 -2.91 -12.1 6.25 0.902
## 8 time~ Pre 2~ "Post~ 0 2.79 -6.24 11.8 0.911
## 9 time~ Pre 2~ "One ~ 0 -4.94 -14.2 4.33 0.577
## 10 time~ Post ~ "One ~ 0 -7.73 -17.0 1.55 0.148
## # ... with 1 more variable: p.adj.signif <chr>
bartlett.test(CD4_.Nonnaive.cTfh.ICOS..CD38...CXCR3._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
##
## Bartlett test of homogeneity of variances
##
## data: CD4_.Nonnaive.cTfh.ICOS..CD38...CXCR3._FreqParent by timeCategory
## Bartlett's K-squared = 12.894, df = 4, p-value = 0.0118
# tukey_hsd( aov(CD4_.Nonnaive.cTfh.ICOS..CD38...CXCR3._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes')) )
kruskal_test(formula = CD4_.Nonnaive.cTfh.ICOS..CD38...CXCR3._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 CD4_.Nonnaive.cTfh.ICOS..CD38...CXCR3~ 74 5.83 4 0.212 Kruskal-Wa~
# dunn_test(CD4_.Nonnaive.cTfh.ICOS..CD38...CXCR3._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
prePostTime(data = subsetData, xData = "timeCategory", yData="CD4_.Nonnaive.cTfh.ICOS..CD38...CXCR3._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "cTfh",
xLabel = " ", yLabel = "CXCR3+ (% ICOS+CD38+ cTfh)", repMeasures = F, newform = T, recentCOVID = T) + scale_y_continuous(limits = c(0,80),breaks=seq(0,100,10))
## [1] "block3.1 recentCOVID"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Removed 11 row(s) containing missing values (geom_path).
## Warning: Removed 12 rows containing missing values (geom_point).
# ggsave(filename = "./Images/cTfh_responses_CXCR3_bothCohorts_overTime_recentCOVID.pdf")
bivScatter(data1 = subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 1st dose" & Tube == "HEP"), name1 = "Naive",
data2 = subset(mergedData, Prior.COVID.infection. == 'Yes' & timeCategory == "Post 1st dose" & Tube == "HEP"), name2 = "Experienced",
xData = "Age", yData = "CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqParent", fillParam = "Prior.COVID.infection.", title = "Post 1st dose",
xLabel = "Age", yLabel = "ICOS+CD38+ (% cTfh)", nonparam = T) + scale_y_continuous(breaks=seq(0,27,3), limits = c(0,25) )+ scale_x_continuous(limits = c(20,70))
## Warning in cor.test.default(data1[, xData], data1[, yData], method = "kendall"):
## Cannot compute exact p-value with ties
## Warning in cor.test.default(data2[, xData], data2[, yData], method = "kendall"):
## Cannot compute exact p-value with ties
## `geom_smooth()` using formula 'y ~ x'
## `geom_smooth()` using formula 'y ~ x'
# ggsave(filename = "./Images/Age_correl_HiHiTfh_Vax1.pdf", width=8)
bivScatter(data1 = subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 2nd dose" & Tube == "HEP"), name1 = "Naive",
data2 = subset(mergedData, Prior.COVID.infection. == 'Yes' & timeCategory == "Post 2nd dose" & Tube == "HEP"), name2 = "Experienced",
xData = "Age", yData = "CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqParent", fillParam = "Prior.COVID.infection.", title = "Post 2nd dose",
xLabel = "Age", yLabel = "ICOS+CD38+ (% cTfh)", nonparam = T) + scale_y_continuous(breaks=seq(0,27,3), limits = c(0,25) ) + scale_x_continuous(limits = c(20,70))
## Warning in cor.test.default(data1[, xData], data1[, yData], method = "kendall"):
## Cannot compute exact p-value with ties
## Warning in cor.test.default(data1[, xData], data1[, yData], method = "kendall"):
## Cannot compute exact p-value with ties
## `geom_smooth()` using formula 'y ~ x'
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 12 rows containing missing values (geom_smooth).
# ggsave(filename = "./Images/Age_correl_HiHiTfh_Vax2.pdf", width=8)
bivScatter(data1 = subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 1st dose" & Tube == "HEP"), name1 = "Naive",
data2 = subset(mergedData, Prior.COVID.infection. == 'Yes' & timeCategory == "Post 1st dose" & Tube == "HEP"), name2 = "Experienced",
xData = "Age", yData = "FCtfh_Vax1", fillParam = "Prior.COVID.infection.", title = "Post 1st dose",
xLabel = "Age", yLabel = "Fold-change ICOS+CD38+ cTfh", nonparam = T) +scale_y_continuous(breaks=seq(0,30,1), limits = c(0,6) )+ scale_x_continuous(limits = c(20,70))
## Warning in cor.test.default(data1[, xData], data1[, yData], method = "kendall"):
## Cannot compute exact p-value with ties
## Warning in cor.test.default(data1[, xData], data1[, yData], method = "kendall"):
## Cannot compute exact p-value with ties
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 2 rows containing non-finite values (stat_smooth).
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 2 rows containing non-finite values (stat_smooth).
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 11 rows containing missing values (geom_smooth).
# ggsave(filename = "./Images/Age_correl_FCtfh_Vax1.pdf", width=8)
bivScatter(data1 = subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 2nd dose" & Tube == "HEP"), name1 = "Naive",
data2 = subset(mergedData, Prior.COVID.infection. == 'Yes' & timeCategory == "Post 2nd dose" & Tube == "HEP"), name2 = "Experienced",
xData = "Age", yData = "FCtfh_Vax2", fillParam = "Prior.COVID.infection.", title = "Post 2nd dose",
xLabel = "Age", yLabel = "Fold-change ICOS+CD38+ cTfh", nonparam = T) + scale_y_continuous(breaks=seq(0,30,1), limits = c(0,6) ) + scale_x_continuous(limits = c(20,70))
## Warning in cor.test.default(data1[, xData], data1[, yData], method = "kendall"):
## Cannot compute exact p-value with ties
## Warning in cor.test.default(data2[, xData], data2[, yData], method = "kendall"):
## Cannot compute exact p-value with ties
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 1 rows containing non-finite values (stat_smooth).
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 1 rows containing non-finite values (stat_smooth).
## Warning: Removed 1 rows containing missing values (geom_point).
## Warning: Removed 1 rows containing missing values (geom_point).
# ggsave(filename = "./Images/Age_correl_FCtfh_Vax2.pdf", width=8)
subsetData <- subset(mergedData, timeCategory != "two Weeks" & timeCategory != "2 wks post 2nd dose");
subsetData$timeCategory <- factor(subsetData$timeCategory, levels = c("Baseline", "Post 1st dose", "Pre 2nd dose", "Post 2nd dose","One month post\n2nd dose"))
prePostTime(subsetData, xData = "timeCategory", yData="AIM_CD4.CXCR5.PD1..CD38hi.CD69.CD200._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID",
title = "Activated cTfh", xLabel = " ", yLabel = "CD69+CD200+ (% activated cTfh)", repMeasures = F, exponential=F, newform = T) +
scale_y_continuous(limits = c(0,10), breaks = seq(0,10,1))
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Removed 118 row(s) containing missing values (geom_path).
## Warning: Removed 118 rows containing missing values (geom_point).
# ggsave(filename = "./Images/AIM_cTfh_69-200_overTime.pdf")
bartlett.test(AIM_CD4.CXCR5.PD1..CD38hi.CD69.CD200._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
##
## Bartlett test of homogeneity of variances
##
## data: AIM_CD4.CXCR5.PD1..CD38hi.CD69.CD200._FreqParent by timeCategory
## Bartlett's K-squared = 9.6695, df = 4, p-value = 0.04638
kruskal_test(formula = AIM_CD4.CXCR5.PD1..CD38hi.CD69.CD200._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 AIM_CD4.CXCR5.PD1..CD38hi.CD69.CD200~ 102 12.4 4 0.0147 Kruskal-Wa~
dunn_test(AIM_CD4.CXCR5.PD1..CD38hi.CD69.CD200._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 AIM_CD4.C~ Baseli~ "Post ~ 6 6 1.06 2.91e-1 1 ns
## 2 AIM_CD4.C~ Baseli~ "Pre 2~ 6 6 2.05 4.08e-2 0.326 ns
## 3 AIM_CD4.C~ Baseli~ "Post ~ 6 6 3.37 7.63e-4 0.00763 **
## 4 AIM_CD4.C~ Baseli~ "One m~ 6 6 1.78 7.48e-2 0.523 ns
## 5 AIM_CD4.C~ Post 1~ "Pre 2~ 6 6 0.990 3.22e-1 1 ns
## 6 AIM_CD4.C~ Post 1~ "Post ~ 6 6 2.31 2.09e-2 0.188 ns
## 7 AIM_CD4.C~ Post 1~ "One m~ 6 6 0.726 4.68e-1 1 ns
## 8 AIM_CD4.C~ Pre 2n~ "Post ~ 6 6 1.32 1.87e-1 0.934 ns
## 9 AIM_CD4.C~ Pre 2n~ "One m~ 6 6 -0.264 7.92e-1 1 ns
## 10 AIM_CD4.C~ Post 2~ "One m~ 6 6 -1.58 1.13e-1 0.679 ns
bartlett.test(AIM_CD4.CXCR5.PD1..CD38hi.CD69.CD200._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
##
## Bartlett test of homogeneity of variances
##
## data: AIM_CD4.CXCR5.PD1..CD38hi.CD69.CD200._FreqParent by timeCategory
## Bartlett's K-squared = 1.9833, df = 4, p-value = 0.7388
kruskal_test(formula = AIM_CD4.CXCR5.PD1..CD38hi.CD69.CD200._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 AIM_CD4.CXCR5.PD1..CD38hi.CD69.CD200.~ 74 4.95 4 0.293 Kruskal-Wa~
tukey_hsd( aov(AIM_CD4.CXCR5.PD1..CD38hi.CD69.CD200._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes')) )
## # A tibble: 10 x 9
## term group1 group2 null.value estimate conf.low conf.high p.adj p.adj.signif
## * <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 time~ Basel~ "Post~ 0 1.30 -1.49 4.08 0.649 ns
## 2 time~ Basel~ "Pre ~ 0 1.41 -1.38 4.20 0.576 ns
## 3 time~ Basel~ "Post~ 0 0.428 -2.36 3.21 0.991 ns
## 4 time~ Basel~ "One ~ 0 0.0792 -2.71 2.87 1 ns
## 5 time~ Post ~ "Pre ~ 0 0.113 -2.38 2.61 1 ns
## 6 time~ Post ~ "Post~ 0 -0.868 -3.36 1.62 0.839 ns
## 7 time~ Post ~ "One ~ 0 -1.22 -3.71 1.28 0.608 ns
## 8 time~ Pre 2~ "Post~ 0 -0.982 -3.47 1.51 0.771 ns
## 9 time~ Pre 2~ "One ~ 0 -1.33 -3.82 1.16 0.526 ns
## 10 time~ Post ~ "One ~ 0 -0.348 -2.84 2.14 0.993 ns
subsetData <- subset(mergedData, timeCategory == "Baseline" | timeCategory == "Post 2nd dose")
FC_response2 <- dcast( subsetData, `Record.ID`+`Alias` + `Prior.COVID.infection.` ~`timeCategory`, value.var = c("AIM_CD4.CXCR5.PD1..CD38hi.CD69.CD200._FreqParent"))
FC_response2$FoldChange <- FC_response2$`Post 2nd dose`/FC_response2$`Baseline`; FC_response2$Cohort <- NULL
FC_response2 <- FC_response2[!is.infinite(FC_response2$FoldChange), ]
FC_response2 %>% group_by(Prior.COVID.infection.) %>% get_summary_stats(type = "common")
## # A tibble: 6 x 11
## Prior.COVID.inf~ variable n min max median iqr mean sd se
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 No Baseline 2 0.290 1.75 1.02 0.73 1.02 1.03 0.73
## 2 No FoldCha~ 2 1.83 27.2 14.5 12.7 14.5 17.9 12.7
## 3 No Post 2n~ 2 3.21 7.89 5.55 2.34 5.55 3.31 2.34
## 4 Yes Baseline 3 0.47 2.04 1.4 0.785 1.30 0.789 0.456
## 5 Yes FoldCha~ 3 0.441 3.02 0.471 1.29 1.31 1.48 0.855
## 6 Yes Post 2n~ 5 0.66 3.39 1.42 0.89 1.63 1.08 0.482
## # ... with 1 more variable: ci <dbl>
—————— B cell analyses ————————–
subsetData <- subset(mergedData, timeCategory != "two Weeks" & timeCategory != "2 wks post 2nd dose"); subsetData$timeCategory <- factor(subsetData$timeCategory, levels = c("Baseline", "Post 1st dose", "Pre 2nd dose", "Post 2nd dose","One month post\n2nd dose"))
prePostTime(subsetData, xData = "DPV", yData="CD19_.CD27..CD38._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "PB",
xLabel = "Prior COVID?", yLabel = "CD27+CD38+ (% CD19)", repMeasures = F) + geom_vline(xintercept = 0,linetype="dashed", alpha=0.5)+ coord_cartesian(xlim = c(-1,12))
## [1] "block2"
## Warning: Removed 10 row(s) containing missing values (geom_path).
## Warning: Removed 11 rows containing missing values (geom_point).
subsetData$DPV <- subsetData$DPV - difftime(subsetData$Vaccine.2.date, subsetData$Vaccine.1.date, units="days" )
prePostTime(subsetData, xData = "DPV", yData="CD19_.CD27..CD38._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "PB",
xLabel = "Prior COVID?", yLabel = "CD27+CD38+ (% CD19)", repMeasures = F) + geom_vline(xintercept = 0,linetype="dashed", alpha=0.5) + coord_cartesian(xlim = c(-5,12))
## [1] "block2"
## Don't know how to automatically pick scale for object of type difftime. Defaulting to continuous.
## Warning: Removed 10 row(s) containing missing values (geom_path).
## Warning: Removed 11 rows containing missing values (geom_point).
subsetData <- subset(mergedData, timeCategory != "two Weeks" & timeCategory != "2 wks post 2nd dose");
subsetData <- subsetData[which(subsetData$Tube == "HEP"),]
subsetData$timeCategory <- factor(subsetData$timeCategory, levels = c("Baseline", "Post 1st dose", "Pre 2nd dose", "Post 2nd dose","One month post\n2nd dose"))
prePostTime(subsetData, xData = "timeCategory", yData="CD19_.CD27..CD38._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "Plasmablasts",
xLabel = " ", yLabel = "CD27+CD38+ (% CD19)", repMeasures = F, newform = T) # + ggrepel::geom_text_repel(aes(label=Record.ID),size=2)
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
# ggsave(filename = "./Images/PB_responses_bothCohorts_overTime.pdf")
bartlett.test(CD19_.CD27..CD38._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
##
## Bartlett test of homogeneity of variances
##
## data: CD19_.CD27..CD38._FreqParent by timeCategory
## Bartlett's K-squared = 15.93, df = 4, p-value = 0.003115
kruskal_test(formula = CD19_.CD27..CD38._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 CD19_.CD27..CD38._FreqParent 98 2.54 4 0.637 Kruskal-Wallis
dunn_test(CD19_.CD27..CD38._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 CD19_.CD27~ Baseli~ "Post 1st~ 19 21 0.665 0.506 1 ns
## 2 CD19_.CD27~ Baseli~ "Pre 2nd ~ 19 20 0.0470 0.963 1 ns
## 3 CD19_.CD27~ Baseli~ "Post 2nd~ 19 20 -0.338 0.736 1 ns
## 4 CD19_.CD27~ Baseli~ "One mont~ 19 18 1.05 0.292 1 ns
## 5 CD19_.CD27~ Post 1~ "Pre 2nd ~ 21 20 -0.626 0.532 1 ns
## 6 CD19_.CD27~ Post 1~ "Post 2nd~ 21 20 -1.02 0.308 1 ns
## 7 CD19_.CD27~ Post 1~ "One mont~ 21 18 0.425 0.671 1 ns
## 8 CD19_.CD27~ Pre 2n~ "Post 2nd~ 20 20 -0.390 0.697 1 ns
## 9 CD19_.CD27~ Pre 2n~ "One mont~ 20 18 1.02 0.307 1 ns
## 10 CD19_.CD27~ Post 2~ "One mont~ 20 18 1.40 0.161 1 ns
bartlett.test(CD19_.CD27..CD38._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
##
## Bartlett test of homogeneity of variances
##
## data: CD19_.CD27..CD38._FreqParent by timeCategory
## Bartlett's K-squared = 12.612, df = 4, p-value = 0.01333
kruskal_test(formula = CD19_.CD27..CD38._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 CD19_.CD27..CD38._FreqParent 61 3.15 4 0.532 Kruskal-Wallis
dunn_test(CD19_.CD27..CD38._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 CD19_.CD2~ Baseli~ "Post 1st~ 6 14 -0.147 0.883 1 ns
## 2 CD19_.CD2~ Baseli~ "Pre 2nd ~ 6 13 0.407 0.684 1 ns
## 3 CD19_.CD2~ Baseli~ "Post 2nd~ 6 14 0.542 0.588 1 ns
## 4 CD19_.CD2~ Baseli~ "One mont~ 6 14 1.15 0.249 1 ns
## 5 CD19_.CD2~ Post 1~ "Pre 2nd ~ 14 13 0.708 0.479 1 ns
## 6 CD19_.CD2~ Post 1~ "Post 2nd~ 14 14 0.889 0.374 1 ns
## 7 CD19_.CD2~ Post 1~ "One mont~ 14 14 1.68 0.0934 0.934 ns
## 8 CD19_.CD2~ Pre 2n~ "Post 2nd~ 13 14 0.165 0.869 1 ns
## 9 CD19_.CD2~ Pre 2n~ "One mont~ 13 14 0.938 0.348 1 ns
## 10 CD19_.CD2~ Post 2~ "One mont~ 14 14 0.788 0.431 1 ns
#
# subsetData = subset(mergedData, mergedData$shortForm == 'bL' | mergedData$shortForm=='oW'); subsetData = subset(subsetData, subsetData$Prior.COVID.infection.=="No")
# prePostTime(data=subsetData, xData = "shortForm", yData="CD19_.CD27..CD38._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "PB - Vax1",
# xLabel = " ", yLabel = "CD27+CD38+ (% CD19)") + scale_y_continuous(breaks = seq(0,21,0.5), limits = c(0,2)) +
# scale_x_discrete(labels= c("Baseline","Post\n1st dose"))# + ggrepel::geom_text_repel(aes(label = Record.ID))
# # ggsave(filename = "./Images/PB_vax1_healthy_paired.pdf", width=4)
#
#
# subsetData = subset(mergedData, mergedData$shortForm == '3W' | mergedData$shortForm=='4W'); subsetData = subset(subsetData, subsetData$Prior.COVID.infection.=="No")
# prePostTime(data=subsetData, xData = "shortForm", yData="CD19_.CD27..CD38._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID",
# title = "PB - Vax2", xLabel = " ", yLabel = "CD27+CD38+ (% CD19)") + scale_y_continuous(breaks = seq(0,21,0.5), limits = c(0,2)) +
# scale_x_discrete(labels= c("Pre\n2nd dose","Post\n2nd dose"))# + ggrepel::geom_text_repel(aes(label = Record.ID))
# # ggsave(filename = "./Images/PB_vax2_healthy_paired.pdf", width=4)
#
# subsetData = subset(mergedData, mergedData$shortForm == 'bL' | mergedData$shortForm=='oW'); subsetData = subset(subsetData, subsetData$Prior.COVID.infection.=="Yes")
# prePostTime(data=subsetData, xData = "shortForm", yData="CD19_.CD27..CD38._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID",
# title = "PB - Vax1", xLabel = " ", yLabel = "CD27+CD38+ (% CD19)") +
# scale_y_continuous(breaks = seq(0,21,0.5), limits = c(0,3)) + scale_x_discrete(labels= c("Baseline","Post\n1st dose"))+ scale_fill_manual(values=c("#B5B2F1"))
# # ggsave(filename = "./Images/PB_vax1_covid_paired.pdf", width=4)
#
# subsetData = subset(mergedData, mergedData$shortForm == '3W' | mergedData$shortForm=='4W'); subsetData = subset(subsetData, subsetData$Prior.COVID.infection.=="Yes")
# prePostTime(data=subsetData, xData = "shortForm", yData="CD19_.CD27..CD38._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID",
# title = "PB - Vax2", xLabel = " ", yLabel = "CD27+CD38+ (% CD19)") +
# scale_y_continuous(breaks = seq(0,21,0.5), limits = c(0,3)) + scale_x_discrete(labels= c("Pre\n2nd dose","Post\n2nd dose"))+ scale_fill_manual(values=c("#B5B2F1"))
# # ggsave(filename = "./Images/PB_vax2_covid_paired.pdf", width=4)
#
# subsetData = subset(mergedData, mergedData$shortForm == 'bL' ); subsetData = subset(subsetData, subsetData$Prior.COVID.infection.=="No")
# univScatter(data = subsetData, xData = "FCtfh_Vax1", yData = "FCPB_Vax1", fillParam = "Prior.COVID.infection.", title = " ", xLabel = "Fold-change Tfh",
# yLabel = "Fold-change PB", position = "left")
# subsetData = subset(mergedData, mergedData$shortForm == 'bL' ); subsetData = subset(subsetData, subsetData$Prior.COVID.infection.=="Yes")
# univScatter(data = subsetData, xData = "FCtfh_Vax1", yData = "FCPB_Vax1", fillParam = "Prior.COVID.infection.", title = " ", xLabel = "Fold-change Tfh",
# yLabel = "Fold-change PB", position = "left")+ scale_fill_manual(values=c("#B5B2F1"))
#
#
# subsetData = subset(mergedData, mergedData$shortForm == 'oW')
# subsetData %>% group_by(Prior.COVID.infection.) %>% shapiro_test(CD19_.CD27..CD38._FreqParent)
# twoSampleBar(data=subsetData, xData = "Prior.COVID.infection.", yData="CD19_.CD27..CD38._FreqParent", fillParam = "Prior.COVID.infection.", title = "PB post 1st dose",
# yLabel = "CD27+CD38+ (% CD19)", nonparam = T) + scale_y_continuous(breaks = seq(0,20,1), limits = c(0,2))
#
# subsetData = subset(mergedData, mergedData$shortForm == '4W')
# subsetData %>% group_by(Prior.COVID.infection.) %>% shapiro_test(CD19_.CD27..CD38._FreqParent)
# twoSampleBar(data=subsetData, xData = "Prior.COVID.infection.", yData="CD19_.CD27..CD38._FreqParent", fillParam = "Prior.COVID.infection.", title = "PB post 2nd dose",
# yLabel = "CD27+CD38+ (% CD19)", nonparam = T) + scale_y_continuous(breaks = seq(0,20,1), limits = c(0,2))
subsetData <- subset(mergedData, timeCategory != "two Weeks" & timeCategory != "2 wks post 2nd dose");
subsetData <- subsetData[which(subsetData$Tube == "HEP"),]
subsetData$timeCategory <- factor(subsetData$timeCategory, levels = c("Baseline", "Post 1st dose", "Pre 2nd dose", "Post 2nd dose", "One month post\n2nd dose"))
subsetData$CD19_.CD27..CD38..CD138._FreqParent <- subsetData$CD19_.CD27..CD38..CD138._FreqParent * subsetData$CD19_.CD27..CD38._FreqParent / 100
if( is.na(sum(subsetData$CD19_.CD27..CD38..CD138._FreqParent, na.rm = F))) # look for NA values, should give NA result if true
{ subsetData <- subsetData[-which(is.na(subsetData$CD19_.CD27..CD38..CD138._FreqParent)), ] }
prePostTime(data=subsetData, xData = "timeCategory", yData="CD19_.CD27..CD38..CD138._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID",
title = "CD138+ Plasmablasts", xLabel = " ", yLabel = "CD27+CD38+CD138+CD20- (% CD19)", repMeasures = F, newform = T) +
scale_y_continuous(breaks = seq(0,2,0.1), limits = c(0,0.6))
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
# ggsave(filename = "./Images/PB_deepPhenotype_bothCohorts_overTime.pdf")
bartlett.test(CD19_.CD27..CD38..CD138._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
##
## Bartlett test of homogeneity of variances
##
## data: CD19_.CD27..CD38..CD138._FreqParent by timeCategory
## Bartlett's K-squared = 22.162, df = 4, p-value = 0.0001861
kruskal_test(formula = CD19_.CD27..CD38..CD138._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 CD19_.CD27..CD38..CD138._FreqParent 98 11.2 4 0.0239 Kruskal-Wall~
dunn_test(CD19_.CD27..CD38..CD138._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 CD19_.CD2~ Baseli~ "Post 1~ 19 21 2.31 0.0206 0.186 ns
## 2 CD19_.CD2~ Baseli~ "Pre 2n~ 19 20 0.339 0.734 1 ns
## 3 CD19_.CD2~ Baseli~ "Post 2~ 19 20 0.114 0.909 1 ns
## 4 CD19_.CD2~ Baseli~ "One mo~ 19 18 -0.869 0.385 1 ns
## 5 CD19_.CD2~ Post 1~ "Pre 2n~ 21 20 -2.00 0.0457 0.320 ns
## 6 CD19_.CD2~ Post 1~ "Post 2~ 21 20 -2.23 0.0258 0.207 ns
## 7 CD19_.CD2~ Post 1~ "One mo~ 21 18 -3.17 0.00152 0.0152 *
## 8 CD19_.CD2~ Pre 2n~ "Post 2~ 20 20 -0.228 0.820 1 ns
## 9 CD19_.CD2~ Pre 2n~ "One mo~ 20 18 -1.21 0.225 1 ns
## 10 CD19_.CD2~ Post 2~ "One mo~ 20 18 -0.993 0.321 1 ns
bartlett.test(CD19_.CD27..CD38..CD138._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
##
## Bartlett test of homogeneity of variances
##
## data: CD19_.CD27..CD38..CD138._FreqParent by timeCategory
## Bartlett's K-squared = 27.109, df = 4, p-value = 1.89e-05
kruskal_test(formula = CD19_.CD27..CD38..CD138._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 CD19_.CD27..CD38..CD138._FreqParent 61 3.13 4 0.537 Kruskal-Wallis
dunn_test(CD19_.CD27..CD38..CD138._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 CD19_.CD27~ Baseline "Post 1s~ 6 14 0.305 0.760 1 ns
## 2 CD19_.CD27~ Baseline "Pre 2nd~ 6 13 0.645 0.519 1 ns
## 3 CD19_.CD27~ Baseline "Post 2n~ 6 14 0.932 0.351 1 ns
## 4 CD19_.CD27~ Baseline "One mon~ 6 14 1.43 0.154 1 ns
## 5 CD19_.CD27~ Post 1s~ "Pre 2nd~ 14 13 0.440 0.660 1 ns
## 6 CD19_.CD27~ Post 1s~ "Post 2n~ 14 14 0.809 0.418 1 ns
## 7 CD19_.CD27~ Post 1s~ "One mon~ 14 14 1.45 0.148 1 ns
## 8 CD19_.CD27~ Pre 2nd~ "Post 2n~ 13 14 0.354 0.724 1 ns
## 9 CD19_.CD27~ Pre 2nd~ "One mon~ 13 14 0.980 0.327 1 ns
## 10 CD19_.CD27~ Post 2n~ "One mon~ 14 14 0.639 0.523 1 ns
—————— Tbet+ CD11c+ B cell analyses ————————–
subsetData <- subset(mergedData, timeCategory != "two Weeks" & timeCategory != "2 wks post 2nd dose");
subsetData$timeCategory <- factor(subsetData$timeCategory, levels = c("Baseline", "Post 1st dose", "Pre 2nd dose", "Post 2nd dose","One month post\n2nd dose"))
prePostTime(subsetData, xData = "timeCategory", yData="CD19_.Nonnaive.B.Tbet..CD11C._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "Tbet+CD11c+ B cells",
xLabel = " ", yLabel = "Tbet+CD11+ (% nonnavB)", repMeasures = F, newform =T)
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Removed 10 row(s) containing missing values (geom_path).
## Warning: Removed 11 rows containing missing values (geom_point).
# ggsave(filename = "./Images/CD11cTbet_Bcells_bothCohorts_overTime.pdf")
—————— GzmB CD 8 analyses ————————–
subsetData <- subset(mergedData, timeCategory != "two Weeks"& timeCategory != "2 wks post 2nd dose");
subsetData$timeCategory <- factor(subsetData$timeCategory, levels = c("Baseline", "Post 1st dose", "Pre 2nd dose", "Post 2nd dose", "One month post\n2nd dose"))
prePostTime(data = subsetData, xData = "timeCategory", yData="CD8_.CD38.Ki67..GzmB..CD8_FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "Activated CD8",
xLabel = " ", yLabel = "GzmB+ (% CD8+Ki67+CD38+)", repMeasures=F, newform=T) +
scale_y_continuous(limits = c(0,110), breaks = seq(0,100,10)) # +
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
## Warning: Removed 10 row(s) containing missing values (geom_path).
## Warning: Removed 11 rows containing missing values (geom_point).
# ggformula::geom_spline(aes_string(x="DPV", y="CD8_.CD38.Ki67..GzmB..CD8_FreqParent"), color="blue",size=1, spar=0.5)
# ggrepel::geom_text_repel(data = subset(subsetData, Alias == "HV-002"), aes(label=Record.ID),size=2)
# ggsave(filename = "./Images/CD8_CD38hiKi67hi_GzmB.pdf" )
fit <- aov(CD8_.CD38.Ki67..GzmB..CD8_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No')); tukey_hsd(fit); formatC(tukey_hsd(fit)$p.adj, format="e")
## # A tibble: 10 x 9
## term group1 group2 null.value estimate conf.low conf.high p.adj
## * <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 time~ Basel~ "Post~ 0 0.136 -14.7 14.9 1
## 2 time~ Basel~ "Pre ~ 0 -3.37 -18.3 11.6 0.971
## 3 time~ Basel~ "Post~ 0 14.6 -0.326 29.6 0.0583
## 4 time~ Basel~ "One ~ 0 -3.74 -19.1 11.6 0.961
## 5 time~ Post ~ "Pre ~ 0 -3.50 -18.1 11.1 0.963
## 6 time~ Post ~ "Post~ 0 14.5 -0.0920 29.1 0.0523
## 7 time~ Post ~ "One ~ 0 -3.87 -18.9 11.1 0.952
## 8 time~ Pre 2~ "Post~ 0 18.0 3.23 32.8 0.00887
## 9 time~ Pre 2~ "One ~ 0 -0.372 -15.6 14.8 1
## 10 time~ Post ~ "One ~ 0 -18.4 -33.6 -3.20 0.0095
## # ... with 1 more variable: p.adj.signif <chr>
## [1] "1.0000e+00" "9.7100e-01" "5.8300e-02" "9.6100e-01" "9.6300e-01"
## [6] "5.2300e-02" "9.5200e-01" "8.8700e-03" "1.0000e+00" "9.5000e-03"
fit <- aov(CD8_.CD38.Ki67..GzmB..CD8_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes')); tukey_hsd(fit); formatC(tukey_hsd(fit)$p.adj, format="e")
## # A tibble: 10 x 9
## term group1 group2 null.value estimate conf.low conf.high p.adj
## * <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 time~ Basel~ "Post~ 0 22.5 3.74 41.3 1.10e-2
## 2 time~ Basel~ "Pre ~ 0 2.19 -16.9 21.3 9.98e-1
## 3 time~ Basel~ "Post~ 0 29.6 10.8 48.4 3.66e-4
## 4 time~ Basel~ "One ~ 0 4.83 -14.0 23.6 9.51e-1
## 5 time~ Post ~ "Pre ~ 0 -20.3 -38.8 -1.94 2.31e-2
## 6 time~ Post ~ "Post~ 0 7.1 -11.0 25.2 8.04e-1
## 7 time~ Post ~ "One ~ 0 -17.7 -35.8 0.355 5.73e-2
## 8 time~ Pre 2~ "Post~ 0 27.4 9.04 45.9 8.32e-4
## 9 time~ Pre 2~ "One ~ 0 2.64 -15.8 21.0 9.94e-1
## 10 time~ Post ~ "One ~ 0 -24.8 -42.9 -6.74 2.46e-3
## # ... with 1 more variable: p.adj.signif <chr>
## [1] "1.1000e-02" "9.9800e-01" "3.6600e-04" "9.5100e-01" "2.3100e-02"
## [6] "8.0400e-01" "5.7300e-02" "8.3200e-04" "9.9400e-01" "2.4600e-03"
prePostTime(data = subsetData, xData = "timeCategory", yData="CD4_.CD38.Ki67..GzmB..CD4_FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "Activated CD4",
xLabel = "Prior COVID?", yLabel = "GzmB+ (% CD4+Ki67+CD38+)", repMeasures=F) #+
## [1] "block2"
## Warning: Removed 10 row(s) containing missing values (geom_path).
## Warning: Removed 11 rows containing missing values (geom_point).
# ggformula::geom_spline(aes_string(x="DPV", y="CD4_.CD38.Ki67..GzmB..CD4_FreqParent"), color="blue",size=1, spar=0.5) #+ ggrepel::geom_text_repel(aes(label=Record.ID),size=2)
fit <- aov(CD4_.CD38.Ki67..GzmB..CD4_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No')); tukey_hsd(fit); formatC(tukey_hsd(fit)$p.adj, format="e")
## # A tibble: 10 x 9
## term group1 group2 null.value estimate conf.low conf.high p.adj p.adj.signif
## * <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 time~ Basel~ "Post~ 0 -2.29 -7.50 2.92 0.737 ns
## 2 time~ Basel~ "Pre ~ 0 -3.54 -8.81 1.73 0.342 ns
## 3 time~ Basel~ "Post~ 0 -2.66 -7.93 2.62 0.628 ns
## 4 time~ Basel~ "One ~ 0 -1.95 -7.36 3.47 0.855 ns
## 5 time~ Post ~ "Pre ~ 0 -1.24 -6.39 3.90 0.962 ns
## 6 time~ Post ~ "Post~ 0 -0.362 -5.50 4.78 1 ns
## 7 time~ Post ~ "One ~ 0 0.348 -4.94 5.63 1 ns
## 8 time~ Pre 2~ "Post~ 0 0.883 -4.32 6.09 0.99 ns
## 9 time~ Pre 2~ "One ~ 0 1.59 -3.75 6.94 0.921 ns
## 10 time~ Post ~ "One ~ 0 0.710 -4.64 6.06 0.996 ns
## [1] "7.3700e-01" "3.4200e-01" "6.2800e-01" "8.5500e-01" "9.6200e-01"
## [6] "1.0000e+00" "1.0000e+00" "9.9000e-01" "9.2100e-01" "9.9600e-01"
fit <- aov(CD4_.CD38.Ki67..GzmB..CD4_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes')); tukey_hsd(fit); formatC(tukey_hsd(fit)$p.adj, format="e")
## # A tibble: 10 x 9
## term group1 group2 null.value estimate conf.low conf.high p.adj p.adj.signif
## * <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 time~ Basel~ "Post~ 0 -1.21 -9.80 7.39 0.995 ns
## 2 time~ Basel~ "Pre ~ 0 -4.75 -13.5 4.00 0.55 ns
## 3 time~ Basel~ "Post~ 0 -2.42 -11.0 6.17 0.932 ns
## 4 time~ Basel~ "One ~ 0 -3.09 -11.7 5.51 0.85 ns
## 5 time~ Post ~ "Pre ~ 0 -3.54 -12.0 4.87 0.761 ns
## 6 time~ Post ~ "Post~ 0 -1.22 -9.47 7.04 0.994 ns
## 7 time~ Post ~ "One ~ 0 -1.88 -10.1 6.37 0.968 ns
## 8 time~ Pre 2~ "Post~ 0 2.33 -6.09 10.7 0.936 ns
## 9 time~ Pre 2~ "One ~ 0 1.66 -6.75 10.1 0.981 ns
## 10 time~ Post ~ "One ~ 0 -0.666 -8.92 7.59 0.999 ns
## [1] "9.9500e-01" "5.5000e-01" "9.3200e-01" "8.5000e-01" "7.6100e-01"
## [6] "9.9400e-01" "9.6800e-01" "9.3600e-01" "9.8100e-01" "9.9900e-01"
#
# subsetData = subset(mergedData, mergedData$shortForm == 'oW')
# subsetData %>% group_by(Prior.COVID.infection.) %>% shapiro_test(CD8_.CD38.Ki67..GzmB..CD8_FreqParent)
# twoSampleBar(data=subsetData, xData = "Prior.COVID.infection.", yData="CD8_.CD38.Ki67..GzmB..CD8_FreqParent", fillParam = "Prior.COVID.infection.", title = "GzmB+ Activated CD8 post 1st dose",
# yLabel = "GzmB+ (% Activated CD8)", nonparam = T) + scale_y_continuous(breaks = seq(0,100,10), limits = c(0,100))
#
# subsetData = subset(mergedData, mergedData$shortForm == '4W')
# subsetData %>% group_by(Prior.COVID.infection.) %>% shapiro_test(CD8_.CD38.Ki67..GzmB..CD8_FreqParent)
# twoSampleBar(data=subsetData, xData = "Prior.COVID.infection.", yData="CD8_.CD38.Ki67..GzmB..CD8_FreqParent", fillParam = "Prior.COVID.infection.", title = "GzmB+ Activated CD8 post 2nd dose",
# yLabel = "GzmB+ (% Activated CD8)", nonparam = T) + scale_y_continuous(breaks = seq(0,100,10), limits = c(0,100))
#
# subsetData = subset(mergedData, mergedData$shortForm == 'oM')
# subsetData %>% group_by(Prior.COVID.infection.) %>% shapiro_test(CD8_.CD38.Ki67..GzmB..CD8_FreqParent)
# twoSampleBar(data=subsetData, xData = "Prior.COVID.infection.", yData="CD8_.CD38.Ki67..GzmB..CD8_FreqParent", fillParam = "Prior.COVID.infection.", title = "GzmB+ Activated CD8 at one month",
# yLabel = "GzmB+ (% Activated CD8)", nonparam = T) + scale_y_continuous(breaks = seq(0,100,10), limits = c(0,100))
—————— GzmB+Tbet+ CD8 analyses ————————–
subsetData <- subset(mergedData, timeCategory != "two Weeks");
subsetData$timeCategory <- factor(subsetData$timeCategory, levels = c("Baseline", "Post 1st dose", "Pre 2nd dose", "Post 2nd dose", "One month post\n2nd dose"))
prePostTime(data = subsetData, xData = "timeCategory", yData="CD8_.CD38.Ki67..GzmB..CD8_FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "Activated CD8",
xLabel = "Prior COVID?", yLabel = "GzmB+ (% CD8+Ki67+CD38+)", repMeasures=F) #+
## [1] "block2"
## Warning: Removed 10 row(s) containing missing values (geom_path).
## Warning: Removed 11 rows containing missing values (geom_point).
# ggformula::geom_spline(aes_string(x="DPV", y="CD8_.CD38.Ki67..GzmB..CD8_FreqParent"), color="blue",size=1, spar=0.5) #+ ggrepel::geom_text_repel(aes(label=Record.ID),size=2)
fit <- aov(CD8_.CD38.Ki67..GzmB..CD8_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No')); tukey_hsd(fit); formatC(tukey_hsd(fit)$p.adj, format="e")
## # A tibble: 10 x 9
## term group1 group2 null.value estimate conf.low conf.high p.adj
## * <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 time~ Basel~ "Post~ 0 0.136 -14.7 14.9 1
## 2 time~ Basel~ "Pre ~ 0 -3.37 -18.3 11.6 0.971
## 3 time~ Basel~ "Post~ 0 14.6 -0.326 29.6 0.0583
## 4 time~ Basel~ "One ~ 0 -3.74 -19.1 11.6 0.961
## 5 time~ Post ~ "Pre ~ 0 -3.50 -18.1 11.1 0.963
## 6 time~ Post ~ "Post~ 0 14.5 -0.0920 29.1 0.0523
## 7 time~ Post ~ "One ~ 0 -3.87 -18.9 11.1 0.952
## 8 time~ Pre 2~ "Post~ 0 18.0 3.23 32.8 0.00887
## 9 time~ Pre 2~ "One ~ 0 -0.372 -15.6 14.8 1
## 10 time~ Post ~ "One ~ 0 -18.4 -33.6 -3.20 0.0095
## # ... with 1 more variable: p.adj.signif <chr>
## [1] "1.0000e+00" "9.7100e-01" "5.8300e-02" "9.6100e-01" "9.6300e-01"
## [6] "5.2300e-02" "9.5200e-01" "8.8700e-03" "1.0000e+00" "9.5000e-03"
fit <- aov(CD8_.CD38.Ki67..GzmB..CD8_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes')); tukey_hsd(fit); formatC(tukey_hsd(fit)$p.adj, format="e")
## # A tibble: 10 x 9
## term group1 group2 null.value estimate conf.low conf.high p.adj
## * <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 time~ Basel~ "Post~ 0 22.5 3.74 41.3 1.10e-2
## 2 time~ Basel~ "Pre ~ 0 2.19 -16.9 21.3 9.98e-1
## 3 time~ Basel~ "Post~ 0 29.6 10.8 48.4 3.66e-4
## 4 time~ Basel~ "One ~ 0 4.83 -14.0 23.6 9.51e-1
## 5 time~ Post ~ "Pre ~ 0 -20.3 -38.8 -1.94 2.31e-2
## 6 time~ Post ~ "Post~ 0 7.1 -11.0 25.2 8.04e-1
## 7 time~ Post ~ "One ~ 0 -17.7 -35.8 0.355 5.73e-2
## 8 time~ Pre 2~ "Post~ 0 27.4 9.04 45.9 8.32e-4
## 9 time~ Pre 2~ "One ~ 0 2.64 -15.8 21.0 9.94e-1
## 10 time~ Post ~ "One ~ 0 -24.8 -42.9 -6.74 2.46e-3
## # ... with 1 more variable: p.adj.signif <chr>
## [1] "1.1000e-02" "9.9800e-01" "3.6600e-04" "9.5100e-01" "2.3100e-02"
## [6] "8.0400e-01" "5.7300e-02" "8.3200e-04" "9.9400e-01" "2.4600e-03"
—————— Foxp3+ CD4 analyses ————————–
subsetData <- subset(mergedData, timeCategory != "two Weeks" & timeCategory != "2 wks post 2nd dose");
subsetData$timeCategory <- factor(subsetData$timeCategory, levels = c("Baseline", "Post 1st dose", "Pre 2nd dose", "Post 2nd dose", "One month post\n2nd dose"))
subsetData <- subsetData[-which(subsetData$Record.ID == "CV-026"),] # exclude because multiple samples with not-believable Foxp3 stains
subsetData <- subsetData[-which(subsetData$Record.ID == "CV-033"),] # exclude because missing file for Pre 2nd dose
prePostTime(data = subsetData, xData = "timeCategory", yData="CD4_.CD38.Ki67..Foxp3._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "Activated CD4",
xLabel = "Prior COVID?", yLabel = "Foxp3+ (% CD4+Ki67+CD38+)", repMeasures=F) #+
## [1] "block2"
## Warning: Removed 20 row(s) containing missing values (geom_path).
## Warning: Removed 20 rows containing missing values (geom_point).
# ggformula::geom_spline(aes_string(x="timeCategory", y="CD4_.CD38.Ki67..Foxp3._FreqParent"), color="blue",size=1, spar=0.5) #+
# ggrepel::geom_text_repel(aes(label=Record.ID),size=2)
fit <- aov(CD4_.CD38.Ki67..Foxp3._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No')); tukey_hsd(fit); formatC(tukey_hsd(fit)$p.adj, format="e")
## # A tibble: 10 x 9
## term group1 group2 null.value estimate conf.low conf.high p.adj
## * <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 time~ Basel~ "Post~ 0 -6.24 -13.0 0.475 8.13e-2
## 2 time~ Basel~ "Pre ~ 0 -5.96 -12.8 0.842 1.14e-1
## 3 time~ Basel~ "Post~ 0 -11.4 -18.3 -4.55 1.23e-4
## 4 time~ Basel~ "One ~ 0 -6.86 -13.9 0.138 5.75e-2
## 5 time~ Post ~ "Pre ~ 0 0.282 -6.43 7.00 1.00e+0
## 6 time~ Post ~ "Post~ 0 -5.20 -12.0 1.60 2.17e-1
## 7 time~ Post ~ "One ~ 0 -0.620 -7.53 6.29 9.99e-1
## 8 time~ Pre 2~ "Post~ 0 -5.49 -12.4 1.41 1.83e-1
## 9 time~ Pre 2~ "One ~ 0 -0.902 -7.90 6.10 9.96e-1
## 10 time~ Post ~ "One ~ 0 4.59 -2.50 11.7 3.79e-1
## # ... with 1 more variable: p.adj.signif <chr>
## [1] "8.1300e-02" "1.1400e-01" "1.2300e-04" "5.7500e-02" "1.0000e+00"
## [6] "2.1700e-01" "9.9900e-01" "1.8300e-01" "9.9600e-01" "3.7900e-01"
fit <- aov(CD4_.CD38.Ki67..Foxp3._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes')); tukey_hsd(fit); formatC(tukey_hsd(fit)$p.adj, format="e")
## # A tibble: 10 x 9
## term group1 group2 null.value estimate conf.low conf.high p.adj
## * <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 time~ Basel~ "Post~ 0 -6.63 -15.6 2.34 0.239
## 2 time~ Basel~ "Pre ~ 0 2.69 -6.49 11.9 0.92
## 3 time~ Basel~ "Post~ 0 -5.45 -14.4 3.52 0.43
## 4 time~ Basel~ "One ~ 0 2.60 -6.36 11.6 0.922
## 5 time~ Post ~ "Pre ~ 0 9.32 0.355 18.3 0.0379
## 6 time~ Post ~ "Post~ 0 1.18 -7.57 9.93 0.995
## 7 time~ Post ~ "One ~ 0 9.24 0.485 18.0 0.0339
## 8 time~ Pre 2~ "Post~ 0 -8.14 -17.1 0.827 0.0918
## 9 time~ Pre 2~ "One ~ 0 -0.0855 -9.05 8.88 1
## 10 time~ Post ~ "One ~ 0 8.05 -0.696 16.8 0.0847
## # ... with 1 more variable: p.adj.signif <chr>
## [1] "2.3900e-01" "9.2000e-01" "4.3000e-01" "9.2200e-01" "3.7900e-02"
## [6] "9.9500e-01" "3.3900e-02" "9.1800e-02" "1.0000e+00" "8.4700e-02"
—————— CD71+ IgD- B cell analyses ————————–
subsetData <- subset(mergedData, timeCategory != "two Weeks" & timeCategory != "2 wks post 2nd dose" );
subsetData$timeCategory <- factor(subsetData$timeCategory, levels = c("Baseline", "Post 1st dose", "Pre 2nd dose", "Post 2nd dose", "One month post\n2nd dose"))
subsetData <- subsetData[which(subsetData$Tube == "HEP"),]
prePostTime(data = subsetData, xData = "timeCategory", yData="CD19_.IgD..CD71._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID",
title = "CD71+ B cells", xLabel = "", yLabel = "IgD-CD71+ (% CD19+)", repMeasures=F, newform = T) #ggrepel::geom_text_repel(aes(label = Alias))
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
# ggsave(filename = "./Images/CD71hi_Bcells_bothCohorts_overTime.pdf")
bartlett.test(CD19_.IgD..CD71._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
##
## Bartlett test of homogeneity of variances
##
## data: CD19_.IgD..CD71._FreqParent by timeCategory
## Bartlett's K-squared = 17.009, df = 4, p-value = 0.001925
kruskal_test(formula = CD19_.IgD..CD71._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 CD19_.IgD..CD71._FreqParent 98 2.49 4 0.646 Kruskal-Wallis
# dunn_test(CD19_.IgD..CD71._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
bartlett.test(CD19_.IgD..CD71._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
##
## Bartlett test of homogeneity of variances
##
## data: CD19_.IgD..CD71._FreqParent by timeCategory
## Bartlett's K-squared = 7.5475, df = 4, p-value = 0.1096
tukey_hsd(aov(CD19_.IgD..CD71._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes')) )
## # A tibble: 10 x 9
## term group1 group2 null.value estimate conf.low conf.high p.adj p.adj.signif
## * <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 time~ Basel~ "Post~ 0 0.560 -1.35 2.47 0.921 ns
## 2 time~ Basel~ "Pre ~ 0 0.801 -1.13 2.74 0.77 ns
## 3 time~ Basel~ "Post~ 0 0.504 -1.41 2.42 0.945 ns
## 4 time~ Basel~ "One ~ 0 0.983 -0.929 2.90 0.599 ns
## 5 time~ Post ~ "Pre ~ 0 0.241 -1.27 1.75 0.991 ns
## 6 time~ Post ~ "Post~ 0 -0.0564 -1.54 1.43 1 ns
## 7 time~ Post ~ "One ~ 0 0.423 -1.06 1.90 0.928 ns
## 8 time~ Pre 2~ "Post~ 0 -0.297 -1.81 1.21 0.981 ns
## 9 time~ Pre 2~ "One ~ 0 0.182 -1.33 1.69 0.997 ns
## 10 time~ Post ~ "One ~ 0 0.479 -1.00 1.96 0.891 ns
# kruskal_test(formula = CD19_.IgD..CD71._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
# dunn_test(CD19_.IgD..CD71._FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
prePostTime(data = subsetData, xData = "timeCategory", yData="CD19_.IgD..CD71..CD20.CD38._FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID",
title = "ASC - Ellebedy subsets", xLabel = "Prior COVID?", yLabel = "CD20loCD38hi (% CD19+IgD-CD71+)", repMeasures=F) #ggrepel::geom_text_repel(aes(label = Alias))
## [1] "block2"
prePostTime(data = subsetData, xData = "timeCategory", yData="CD19_.IgD..CD71..ActivBCells_FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID",
title = "ABC - Ellebedy subsets", xLabel = "Prior COVID?", yLabel = "CD20hiCD38lo (% CD19+IgD-CD71+)", repMeasures=F)# +ggrepel::geom_text_repel(aes(label = Alias))
## [1] "block2"
—————— CD21lo B cell analyses ————————–
subsetData <- subset(mergedData, timeCategory != "two Weeks" & timeCategory != "2 wks post 2nd dose");
subsetData <- subsetData[which(subsetData$Tube == "HEP"),]
subsetData <- subset(subsetData, Label != "PHI-398_V2" & Label != "PHI-021_V1" & Label != "HV-079_V1" ) # exclude because failed QC for CD21lo: CV-028_PHI-398_oW and CV-030_HV-078_4W and CV-022_PHI-021_bL
subsetData$timeCategory <- factor(subsetData$timeCategory, levels = c("Baseline", "Post 1st dose", "Pre 2nd dose", "Post 2nd dose", "One month post\n2nd dose"))
prePostTime(data = subsetData, xData = "timeCategory", yData="CD19_.CD21lo_FreqParent", fillParam = "Prior.COVID.infection.", groupby="Record.ID",
title = "CD21lo B cells", xLabel = " ", yLabel = "CD21lo (% CD19)", repMeasures=F, newform = T) +
scale_y_continuous(breaks = seq(0,20,1))#ggrepel::geom_text_repel(aes(label = Alias))
## [1] "block3"
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
# ggsave(filename = "./Images/CD21lo_bothCohorts_overTime.pdf")
# fit <- aov(CD19_.CD21lo_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No')); tukey_hsd(fit); formatC(tukey_hsd(fit)$p.adj, format="e")
bartlett.test(CD19_.CD21lo_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
##
## Bartlett test of homogeneity of variances
##
## data: CD19_.CD21lo_FreqParent by timeCategory
## Bartlett's K-squared = 9.6262, df = 4, p-value = 0.04722
kruskal_test(formula = CD19_.CD21lo_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 CD19_.CD21lo_FreqParent 97 3.81 4 0.432 Kruskal-Wallis
dunn_test(CD19_.CD21lo_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 CD19_.CD~ Baseline "Post 1st~ 18 21 -0.924 0.355 1 ns
## 2 CD19_.CD~ Baseline "Pre 2nd ~ 18 20 0.227 0.820 1 ns
## 3 CD19_.CD~ Baseline "Post 2nd~ 18 20 0.878 0.380 1 ns
## 4 CD19_.CD~ Baseline "One mont~ 18 18 0.417 0.676 1 ns
## 5 CD19_.CD~ Post 1s~ "Pre 2nd ~ 21 20 1.19 0.235 1 ns
## 6 CD19_.CD~ Post 1s~ "Post 2nd~ 21 20 1.86 0.0625 0.625 ns
## 7 CD19_.CD~ Post 1s~ "One mont~ 21 18 1.36 0.175 1 ns
## 8 CD19_.CD~ Pre 2nd~ "Post 2nd~ 20 20 0.669 0.504 1 ns
## 9 CD19_.CD~ Pre 2nd~ "One mont~ 20 18 0.201 0.840 1 ns
## 10 CD19_.CD~ Post 2n~ "One mont~ 20 18 -0.449 0.653 1 ns
bartlett.test(CD19_.CD21lo_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
##
## Bartlett test of homogeneity of variances
##
## data: CD19_.CD21lo_FreqParent by timeCategory
## Bartlett's K-squared = 2.0852, df = 4, p-value = 0.7201
tukey_hsd(aov(CD19_.CD21lo_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes')) )
## # A tibble: 10 x 9
## term group1 group2 null.value estimate conf.low conf.high p.adj p.adj.signif
## * <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 time~ Basel~ "Post~ 0 0.874 -1.38 3.13 0.809 ns
## 2 time~ Basel~ "Pre ~ 0 1.36 -0.900 3.61 0.445 ns
## 3 time~ Basel~ "Post~ 0 0.812 -1.42 3.04 0.842 ns
## 4 time~ Basel~ "One ~ 0 0.538 -1.69 2.77 0.96 ns
## 5 time~ Post ~ "Pre ~ 0 0.482 -1.31 2.27 0.941 ns
## 6 time~ Post ~ "Post~ 0 -0.0622 -1.82 1.70 1 ns
## 7 time~ Post ~ "One ~ 0 -0.336 -2.10 1.42 0.983 ns
## 8 time~ Pre 2~ "Post~ 0 -0.544 -2.30 1.22 0.906 ns
## 9 time~ Pre 2~ "One ~ 0 -0.818 -2.58 0.942 0.686 ns
## 10 time~ Post ~ "One ~ 0 -0.274 -2.00 1.45 0.991 ns
# kruskal_test(formula = CD19_.CD21lo_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
# dunn_test(CD19_.CD21lo_FreqParent ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
—————— ELISpot analyses ————————–
subsetData <- subset(mergedData, timeCategory == 'Post 1st dose')
a.1 <- twoSampleBar(data = subsetData, xData = 'Prior.COVID.infection.',yData='Elispot_IgG_S1', fillParam = 'Prior.COVID.infection.',title = "S1",
yLabel = "ASC per 1e6 PBMC", nonparam=T) +
scale_y_continuous(trans='pseudo_log', limits = c(0,10000), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
a.2 <- twoSampleBar(data = subsetData, xData = 'Prior.COVID.infection.',yData='Elispot_IgG_S2', fillParam = 'Prior.COVID.infection.',title = "S2",
yLabel = " ", nonparam=T)+
scale_y_continuous(trans='pseudo_log', limits = c(0,10000), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
a.3 <- twoSampleBar(data = subsetData, xData = 'Prior.COVID.infection.',yData='Elispot_IgG_RBD', fillParam = 'Prior.COVID.infection.',title = "RBD",
yLabel = " ", nonparam=T)+
scale_y_continuous(trans='pseudo_log', limits = c(0,10000), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
grid.arrange(a.1,a.2,a.3, nrow=1)
## Warning: Removed 14 rows containing missing values (position_quasirandom).
## Warning: Removed 14 rows containing missing values (position_quasirandom).
## Warning: Removed 14 rows containing missing values (position_quasirandom).
# ggpubr::ggexport(plotlist = list(a.1, a.2, a.3), filename = "./Images/Elispots_IgG_post1stDose_gridarrange.pdf", nrow = 1, width = 12)
a.1 <- twoSampleBar(data = subsetData, xData = 'Prior.COVID.infection.',yData='Elispot_IgA_S1', fillParam = 'Prior.COVID.infection.',title = "S1",
yLabel = "ASC per 1e6 PBMC", nonparam=T) +
scale_y_continuous(trans='pseudo_log', limits = c(0,10000), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
a.2 <- twoSampleBar(data = subsetData, xData = 'Prior.COVID.infection.',yData='Elispot_IgA_S2', fillParam = 'Prior.COVID.infection.',title = "S2",
yLabel = " ", nonparam=T)+
scale_y_continuous(trans='pseudo_log', limits = c(0,10000), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
a.3 <- twoSampleBar(data = subsetData, xData = 'Prior.COVID.infection.',yData='Elispot_IgA_RBD', fillParam = 'Prior.COVID.infection.',title = "RBD",
yLabel = " ", nonparam=T)+
scale_y_continuous(trans='pseudo_log', limits = c(0,10000), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
grid.arrange(a.1,a.2,a.3, nrow=1)
## Warning: Removed 14 rows containing missing values (position_quasirandom).
## Warning: Removed 14 rows containing missing values (position_quasirandom).
## Warning: Removed 14 rows containing missing values (position_quasirandom).
# ggpubr::ggexport(plotlist = list(a.1, a.2, a.3), filename = "./Images/Elispots_IgA_post1stDose_gridarrange.pdf", nrow = 1, width = 12 )
a.1 <- twoSampleBar(data = subsetData, xData = 'Prior.COVID.infection.',yData='Elispot_IgM_S1', fillParam = 'Prior.COVID.infection.',title = "S1",
yLabel = "ASC per 1e6 PBMC", nonparam=T)+
scale_y_continuous(trans='pseudo_log', limits = c(0,10000), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
a.2 <- twoSampleBar(data = subsetData, xData = 'Prior.COVID.infection.',yData='Elispot_IgM_S2', fillParam = 'Prior.COVID.infection.',title = "S2",
yLabel = " ", nonparam=T)+
scale_y_continuous(trans='pseudo_log', limits = c(0,10000), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
a.3 <- twoSampleBar(data = subsetData, xData = 'Prior.COVID.infection.',yData='Elispot_IgM_RBD', fillParam = 'Prior.COVID.infection.',title = "RBD",
yLabel = " ", nonparam=T)+
scale_y_continuous(trans='pseudo_log', limits = c(0,10000), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
grid.arrange(a.1,a.2,a.3, nrow=1)
## Warning: Removed 14 rows containing missing values (position_quasirandom).
## Warning in f(...): The default behavior of beeswarm has changed in version
## 0.6.0. In versions <0.6.0, this plot would have been dodged on the y-axis. In
## versions >=0.6.0, grouponX=FALSE must be explicitly set to group on y-axis.
## Please set grouponX=TRUE/FALSE to avoid this warning and ensure proper axis
## choice.
## Warning: Removed 14 rows containing missing values (position_quasirandom).
## Warning: Removed 14 rows containing missing values (position_quasirandom).
# ggpubr::ggexport(plotlist = list(a.1, a.2, a.3), filename = "./Images/Elispots_IgM_post1stDose_gridarrange.pdf", nrow = 1, width = 12 )
subsetData <- subset(mergedData, timeCategory == 'Post 2nd dose')
a.1 <- twoSampleBar(data = subsetData, xData = 'Prior.COVID.infection.',yData='Elispot_IgG_S1', fillParam = 'Prior.COVID.infection.',title = "S1",
yLabel = "ASC per 1e6 PBMC", nonparam=T) +
scale_y_continuous(trans='pseudo_log', limits = c(0,10000), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
a.2 <- twoSampleBar(data = subsetData, xData = 'Prior.COVID.infection.',yData='Elispot_IgG_S2', fillParam = 'Prior.COVID.infection.',title = "S2",
yLabel = " ", nonparam=T)+
scale_y_continuous(trans='pseudo_log', limits = c(0,10000), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
a.3 <- twoSampleBar(data = subsetData, xData = 'Prior.COVID.infection.',yData='Elispot_IgG_RBD', fillParam = 'Prior.COVID.infection.',title = "RBD",
yLabel = " ", nonparam=T)+
scale_y_continuous(trans='pseudo_log', limits = c(0,10000), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
grid.arrange(a.1,a.2,a.3, nrow=1)
## Warning: Removed 20 rows containing missing values (position_quasirandom).
## Warning: Removed 20 rows containing missing values (position_quasirandom).
## Warning: Removed 20 rows containing missing values (position_quasirandom).
# ggpubr::ggexport(plotlist = list(a.1, a.2, a.3), filename = "./Images/Elispots_IgG_post2ndDose_gridarrange.pdf", nrow = 1, width = 12)
a.1 <- twoSampleBar(data = subsetData, xData = 'Prior.COVID.infection.',yData='Elispot_IgA_S1', fillParam = 'Prior.COVID.infection.',title = "S1",
yLabel = "ASC per 1e6 PBMC", nonparam=T) +
scale_y_continuous(trans='pseudo_log', limits = c(0,10000), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
a.2 <- twoSampleBar(data = subsetData, xData = 'Prior.COVID.infection.',yData='Elispot_IgA_S2', fillParam = 'Prior.COVID.infection.',title = "S2",
yLabel = " ", nonparam=T)+
scale_y_continuous(trans='pseudo_log', limits = c(0,10000), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
a.3 <- twoSampleBar(data = subsetData, xData = 'Prior.COVID.infection.',yData='Elispot_IgA_RBD', fillParam = 'Prior.COVID.infection.',title = "RBD",
yLabel = " ", nonparam=T)+
scale_y_continuous(trans='pseudo_log', limits = c(0,10000), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
grid.arrange(a.1,a.2,a.3, nrow=1)
## Warning: Removed 21 rows containing missing values (position_quasirandom).
## Warning: Removed 21 rows containing missing values (position_quasirandom).
## Warning: Removed 21 rows containing missing values (position_quasirandom).
# ggpubr::ggexport(plotlist = list(a.1, a.2, a.3), filename = "./Images/Elispots_IgA_post2ndDose_gridarrange.pdf", nrow = 1, width = 12 )
a.1 <- twoSampleBar(data = subsetData, xData = 'Prior.COVID.infection.',yData='Elispot_IgM_S1', fillParam = 'Prior.COVID.infection.',title = "S1",
yLabel = "ASC per 1e6 PBMC", nonparam=T)+
scale_y_continuous(trans='pseudo_log', limits = c(0,10000), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
a.2 <- twoSampleBar(data = subsetData, xData = 'Prior.COVID.infection.',yData='Elispot_IgM_S2', fillParam = 'Prior.COVID.infection.',title = "S2",
yLabel = " ", nonparam=T)+
scale_y_continuous(trans='pseudo_log', limits = c(0,10000), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
a.3 <- twoSampleBar(data = subsetData, xData = 'Prior.COVID.infection.',yData='Elispot_IgM_RBD', fillParam = 'Prior.COVID.infection.',title = "RBD",
yLabel = " ", nonparam=T)+
scale_y_continuous(trans='pseudo_log', limits = c(0,10000), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
grid.arrange(a.1,a.2,a.3, nrow=1)
## Warning: Removed 21 rows containing missing values (position_quasirandom).
## Warning: Removed 21 rows containing missing values (position_quasirandom).
## Warning in f(...): The default behavior of beeswarm has changed in version
## 0.6.0. In versions <0.6.0, this plot would have been dodged on the y-axis. In
## versions >=0.6.0, grouponX=FALSE must be explicitly set to group on y-axis.
## Please set grouponX=TRUE/FALSE to avoid this warning and ensure proper axis
## choice.
## Warning: Removed 21 rows containing missing values (position_quasirandom).
# ggpubr::ggexport(plotlist = list(a.1, a.2, a.3), filename = "./Images/Elispots_IgM_post2ndDose_gridarrange.pdf", nrow = 1, width = 12 )
subsetData <- subset(mergedData, !is.na(Elispot_IgG_S1) & timeCategory != "Pre 2nd dose" )
# pdf(file = "./Images/Elispots_IgG_S1_prepostTime.pdf")
prePostTime(data = subsetData, xData = "timeCategory", yData = "Elispot_IgG_S1", fillParam = "Prior.COVID.infection.",
groupby = "Alias", title = "S1", xLabel = " ", yLabel = "IgG ASC per 1e6 PBMC", exponential=T)+
scale_y_continuous(trans='pseudo_log', limits = c(0,10000), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
## NULL
# dev.off()
subsetData <- subset(mergedData, !is.na(Elispot_IgG_S2) & timeCategory != "Pre 2nd dose" )
# pdf(file = "./Images/Elispots_IgG_S2_prepostTime.pdf")
prePostTime(data = subsetData, xData = "timeCategory", yData = "Elispot_IgG_S2", fillParam = "Prior.COVID.infection.",
groupby = "Alias", title = "S2", xLabel = " ", yLabel = "IgG ASC per 1e6 PBMC", exponential=T)+
scale_y_continuous(trans='pseudo_log', limits = c(0,10000), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
## NULL
# dev.off()
subsetData <- subset(mergedData, !is.na(Elispot_IgG_RBD) & timeCategory != "Pre 2nd dose" )
# pdf(file = "./Images/Elispots_IgG_RBD_prepostTime.pdf")
prePostTime(data = subsetData, xData = "timeCategory", yData = "Elispot_IgG_RBD", fillParam = "Prior.COVID.infection.",
groupby = "Alias", title = "RBD", xLabel = " ", yLabel = "IgG ASC per 1e6 PBMC", exponential=T)+
scale_y_continuous(trans='pseudo_log', limits = c(0,10000), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
## NULL
# dev.off()
bivScatter(data1 = subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 2nd dose"),
data2 = subset(mergedData, Prior.COVID.infection. == "Yes" & timeCategory == "Post 2nd dose"),
name1 = "Naive", name2 = "Experienced", xData = "Elispot_IgG_RBD", yData = 'Elispot_IgG_S1', fillParam = 'Prior.COVID.infection.',
title = "IgG ELISpots post 2nd dose", xLabel = "RBD ASC per 10^6 PBMC", yLabel = "S1 ASC per 10^6 PBMC", statsOff = F) +
scale_y_continuous(trans='pseudo_log', limits = c(0,3e4), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10)) +
scale_x_continuous(trans='pseudo_log', limits = c(0,1e4), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 13 rows containing non-finite values (stat_smooth).
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 7 rows containing non-finite values (stat_smooth).
## Warning: Removed 13 rows containing missing values (geom_point).
## Warning: Removed 7 rows containing missing values (geom_point).
## Warning: Removed 1 rows containing missing values (geom_smooth).
## Warning: Removed 4 rows containing missing values (geom_smooth).
# ggsave(filename = "./Images/Elispots_IgG_S1-vs-RBD_correl_biv.pdf", width=8)
bivScatter(data1 = subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 2nd dose"),
data2 = subset(mergedData, Prior.COVID.infection. == "Yes" & timeCategory == "Post 2nd dose"),
name1 = "Naive", name2 = "Experienced", xData = "Elispot_IgG_RBD", yData = 'Elispot_IgG_S2', fillParam = 'Prior.COVID.infection.',
title = "IgG ELISpots post 2nd dose", xLabel = "RBD ASC per 10^6 PBMC", yLabel = "S2 ASC per 10^6 PBMC", statsOff = F) +
scale_y_continuous(trans='pseudo_log', limits = c(0,1e3), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10)) +
scale_x_continuous(trans='pseudo_log', limits = c(0,1e3), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 13 rows containing non-finite values (stat_smooth).
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 7 rows containing non-finite values (stat_smooth).
## Warning: Removed 13 rows containing missing values (geom_point).
## Warning: Removed 7 rows containing missing values (geom_point).
## Warning: Removed 4 rows containing missing values (geom_smooth).
## Warning: Removed 18 rows containing missing values (geom_smooth).
## Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning -
## Inf
# ggsave(filename = "./Images/Elispots_IgG_S2-vs-RBD_correl_biv.pdf", width = 8 )
’ —————– DPV analysis post 1st vaccination ————————
subsetData <- subset(mergedData, timeCategory != "two Weeks"& timeCategory != "2 wks post 2nd dose");
subsetData <- subsetData[which(subsetData$Tube == "HEP"),]
# subsetData <- subset(subsetData, Record.ID != "CV-011" & Record.ID != "CV-012" & Record.ID != "CV-005") # absence of Ki67 stain
subsetData$timeCategory <- factor(subsetData$timeCategory, levels = c("Baseline", "Post 1st dose", "Pre 2nd dose", "Post 2nd dose", "One month post\n2nd dose"))
prePostTime(subsetData, xData = "DPV", yData="Elispot_IgG_S1", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "anti-S1 IgG ASC",
xLabel = "Days", yLabel = "Spots per 10^6 PBMC", repMeasures = F, exponential=F, pathOff = T) +
scale_y_continuous(trans='pseudo_log', limits = c(0,1e3), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10)) +
coord_cartesian(xlim = c(-1,15)) + geom_vline(xintercept = 0,linetype="dashed", alpha=0.5)
## [1] "block2"
## Warning: Removed 122 rows containing missing values (geom_point).
# ggsave(filename = "./Images/Elispots_IgG-S1_vs_DPV.pdf")
prePostTime(subsetData, xData = "DPV", yData="Elispot_IgG_S2", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "anti-S2 IgG ASC",
xLabel = "Days", yLabel = "Spots per 10^6 PBMC", repMeasures = F, exponential=F, pathOff = T) +
scale_y_continuous(trans='pseudo_log', limits = c(0,1e3), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10)) +
coord_cartesian(xlim = c(-1,15)) + geom_vline(xintercept = 0,linetype="dashed", alpha=0.5)
## [1] "block2"
## Warning: Removed 122 rows containing missing values (geom_point).
# ggsave(filename = "./Images/Elispots_IgG-S2_vs_DPV.pdf")
prePostTime(subsetData, xData = "DPV", yData="Elispot_IgG_RBD", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "anti-RBD IgG ASC",
xLabel = "Days", yLabel = "Spots per 10^6 PBMC", repMeasures = F, exponential=F, pathOff = T) +
scale_y_continuous(trans='pseudo_log', limits = c(0,1e3), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10)) +
coord_cartesian(xlim = c(-1,15)) + geom_vline(xintercept = 0,linetype="dashed", alpha=0.5)
## [1] "block2"
## Warning: Removed 121 rows containing missing values (geom_point).
# ggsave(filename = "./Images/Elispots_IgG-RBD_vs_DPV.pdf")
’ —————– post 2nd vaccination ————————
subsetData$DPV <- subsetData$DPV - as.numeric(difftime(subsetData$Vaccine.2.date, subsetData$Vaccine.1.date, units="days" ) )
subsetData <- subset(subsetData, timeCategory == "Post 2nd dose")
prePostTime(subsetData, xData = "DPV", yData="Elispot_IgG_S1", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "anti-S1 IgG ASC",
xLabel = "Days", yLabel = "Spots per 10^6 PBMC", repMeasures = F, exponential=F, pathOff = T) +
scale_y_continuous(trans='pseudo_log', limits = c(0,1e3), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10)) +
coord_cartesian(xlim = c(-5,15)) + geom_vline(xintercept = 0,linetype="dashed", alpha=0.5)
## [1] "block2"
## Warning: Removed 19 rows containing missing values (geom_point).
# ggsave(filename = "./Images/Elispots_IgG-S1_vs_DPV_vax2.pdf")
prePostTime(subsetData, xData = "DPV", yData="Elispot_IgG_S2", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "anti-S2 IgG ASC",
xLabel = "Days", yLabel = "Spots per 10^6 PBMC", repMeasures = F, exponential=F, pathOff = T) +
scale_y_continuous(trans='pseudo_log', limits = c(0,1e3), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10)) +
coord_cartesian(xlim = c(-5,15)) + geom_vline(xintercept = 0,linetype="dashed", alpha=0.5)
## [1] "block2"
## Warning: Removed 19 rows containing missing values (geom_point).
# ggsave(filename = "./Images/Elispots_IgG-S2_vs_DPV_vax2.pdf")
prePostTime(subsetData, xData = "DPV", yData="Elispot_IgG_RBD", fillParam = "Prior.COVID.infection.", groupby="Record.ID", title = "anti-RBD IgG ASC",
xLabel = "Days", yLabel = "Spots per 10^6 PBMC", repMeasures = F, exponential=F, pathOff = T) +
scale_y_continuous(trans='pseudo_log', limits = c(0,1e3), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10)) +
coord_cartesian(xlim = c(-5,15)) + geom_vline(xintercept = 0,linetype="dashed", alpha=0.5)
## [1] "block2"
## Warning: Removed 19 rows containing missing values (geom_point).
# ggsave(filename = "./Images/Elispots_IgG-RBD_vs_DPV_vax2.pdf")
subsetData <- subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 1st dose")
subsetData <- subsetData[,grep("^Elispot", names(subsetData))]; subsetData <- subsetData[,-grep("Elispot_IgA_S1", names(subsetData))]
temp <- names(subsetData) ; temp <- do.call(rbind.data.frame, strsplit(temp, split = "_"))
temp <- paste0(temp[,2]," anti-",temp[,3]); names(subsetData) <- temp
cor.elispots <- cor(subsetData, method="kendall" , use="pairwise.complete.obs" )
cor.elispots.pmat <- ggcorrplot::cor_pmat(subsetData, method="kendall", use="pairwise.complete.obs" )
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
ggcorrplot::ggcorrplot(corr = cor.elispots, p.mat = cor.elispots.pmat, title = "ELISpots post 1st dose", legend.title = "Kendall tau", tl.cex = 18,pch.cex = 1, insig = "blank")
# ggsave(filename = "./Images/Elispots_ggcorrplot_Naive_post1st.pdf")
ggcorrplot::ggcorrplot(corr = cor.elispots, p.mat = cor.elispots.pmat, title = "ELISpots post 1st dose", legend.title = "Kendall tau", tl.cex = 18,pch.cex = 1) #, insig = "blank"
# ggsave(filename = "./Images/Elispots_ggcorrplot_Naive_post1st_full.pdf")
subsetData <- subset(mergedData, Prior.COVID.infection. == 'Yes' & timeCategory == "Post 1st dose")
subsetData <- subsetData[,grep("^Elispot", names(subsetData))];
temp <- names(subsetData) ; temp <- do.call(rbind.data.frame, strsplit(temp, split = "_"))
temp <- paste0(temp[,2]," anti-",temp[,3]); names(subsetData) <- temp
cor.elispots <- cor(subsetData, method="kendall" , use="pairwise.complete.obs" )
cor.elispots.pmat <- ggcorrplot::cor_pmat(subsetData, method="kendall", use= "pairwise.complete.obs" )
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
ggcorrplot::ggcorrplot(corr = cor.elispots, p.mat = cor.elispots.pmat, title = "ELISpots post 1st dose", legend.title = "Kendall tau", tl.cex = 18,pch.cex = 1, insig = "blank") #
# ggsave(filename = "./Images/Elispots_ggcorrplot_Experienced_post1st.pdf")
ggcorrplot::ggcorrplot(corr = cor.elispots, p.mat = cor.elispots.pmat, title = "ELISpots post 1st dose", legend.title = "Kendall tau", tl.cex = 18,pch.cex = 1) #, insig = "blank"
# ggsave(filename = "./Images/Elispots_ggcorrplot_Experienced_post1st_full.pdf")
subsetData <- subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 2nd dose")
subsetData <- subsetData[,grep("^Elispot", names(subsetData))]
temp <- names(subsetData) ; temp <- do.call(rbind.data.frame, strsplit(temp, split = "_"))
temp <- paste0(temp[,2]," anti-",temp[,3]); names(subsetData) <- temp
cor.elispots <- cor(subsetData, method="kendall" , use="pairwise.complete.obs" )
cor.elispots.pmat <- ggcorrplot::cor_pmat(subsetData, method="kendall", use="pairwise.complete.obs" )
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
ggcorrplot::ggcorrplot(corr = cor.elispots, p.mat = cor.elispots.pmat, title = "ELISpots post 2nd dose", legend.title = "Kendall tau", tl.cex = 18,pch.cex = 1, insig = "blank")
# ggsave(filename = "./Images/Elispots_ggcorrplot_Naive_post2nd.pdf")
ggcorrplot::ggcorrplot(corr = cor.elispots, p.mat = cor.elispots.pmat, title = "ELISpots post 2nd dose", legend.title = "Kendall tau", tl.cex = 18,pch.cex = 1) #, insig = "blank"
# ggsave(filename = "./Images/Elispots_ggcorrplot_Naive_post2nd_full.pdf")
subsetData <- subset(mergedData, Prior.COVID.infection. == 'Yes' & timeCategory == "Post 2nd dose")
subsetData <- subsetData[,grep("^Elispot", names(subsetData))]
temp <- names(subsetData) ; temp <- do.call(rbind.data.frame, strsplit(temp, split = "_"))
temp <- paste0(temp[,2]," anti-",temp[,3]); names(subsetData) <- temp
cor.elispots <- cor(subsetData, method="kendall" , use="pairwise.complete.obs" )
cor.elispots.pmat <- ggcorrplot::cor_pmat(subsetData, method="kendall", use= "pairwise.complete.obs" )
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
ggcorrplot::ggcorrplot(corr = cor.elispots, p.mat = cor.elispots.pmat, title = "ELISpots post 2nd dose", legend.title = "Kendall tau", tl.cex = 18,pch.cex = 1, insig = "blank") #
# ggsave(filename = "./Images/Elispots_ggcorrplot_Experienced_post2nd.pdf")
ggcorrplot::ggcorrplot(corr = cor.elispots, p.mat = cor.elispots.pmat, title = "ELISpots post 2nd dose", legend.title = "Kendall tau", tl.cex = 18,pch.cex = 1) #, insig = "blank"
# ggsave(filename = "./Images/Elispots_ggcorrplot_Experienced_post2nd_full.pdf")
—————— Antibody analyses ————————–
subsetData <- mergedData[-which(mergedData$timeCategory == "two Weeks"),] ; subsetData <- subsetData[-which(subsetData$timeCategory == "2 wks post 2nd dose"),]
subsetData$timeCategory <- factor(subsetData$timeCategory, levels = c("Baseline", "Post 1st dose", "Pre 2nd dose", "Post 2nd dose", "One month post\n2nd dose",
"Four months post\n2nd dose"))
a <- linePlot(data = subsetData, xData = 'timeCategory', yData = 'binding_IgG_S1', groupby = 'Alias', xLabel = ' ', yLabel = "anti-S1 IgG titer",
title = "anti-S1 IgG titer", colorby = "Prior.COVID.infection.") +
geom_hline(yintercept = 25, linetype = "dashed",alpha=0.3) + annotate("text", x=5,y=15,label = "LOD", color="black", alpha=0.2)+
scale_y_continuous(trans='pseudo_log', limits = c(0,1e8), breaks=c(10^(0:8)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10)) # +
# ggrepel::geom_text_repel(data = subset(mergedData, is.na(timeCategory) ), aes(label = Label))
a
# ggsave(filename = "./Images/BindingAb_S1_IgG_linePlot.pdf")
# plotly::ggplotly(a)
bartlett.test(binding_IgG_S1 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
##
## Bartlett test of homogeneity of variances
##
## data: binding_IgG_S1 by timeCategory
## Bartlett's K-squared = 609.05, df = 4, p-value < 2.2e-16
kruskal_test(formula = binding_IgG_S1 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 binding_IgG_S1 102 75.7 4 1.38e-15 Kruskal-Wallis
dunn_test(binding_IgG_S1 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 bindin~ Baseli~ "Post 1~ 21 17 1.81 7.01e- 2 1.40e- 1 ns
## 2 bindin~ Baseli~ "Pre 2n~ 21 17 4.53 5.90e- 6 3.54e- 5 ****
## 3 bindin~ Baseli~ "Post 2~ 21 17 7.09 1.30e-12 1.30e-11 ****
## 4 bindin~ Baseli~ "One mo~ 21 17 6.75 1.48e-11 1.33e-10 ****
## 5 bindin~ Post 1~ "Pre 2n~ 17 17 2.59 9.71e- 3 4.86e- 2 *
## 6 bindin~ Post 1~ "Post 2~ 17 17 5.02 5.04e- 7 4.03e- 6 ****
## 7 bindin~ Post 1~ "One mo~ 17 17 4.70 2.63e- 6 1.84e- 5 ****
## 8 bindin~ Pre 2n~ "Post 2~ 17 17 2.44 1.47e- 2 5.89e- 2 ns
## 9 bindin~ Pre 2n~ "One mo~ 17 17 2.11 3.47e- 2 1.04e- 1 ns
## 10 bindin~ Post 2~ "One mo~ 17 17 -0.327 7.43e- 1 7.43e- 1 ns
kruskal_test(formula = binding_IgG_S1 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 binding_IgG_S1 74 37.1 4 0.00000017 Kruskal-Wallis
bartlett.test(binding_IgG_S1 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
##
## Bartlett test of homogeneity of variances
##
## data: binding_IgG_S1 by timeCategory
## Bartlett's K-squared = 122.1, df = 4, p-value < 2.2e-16
dunn_test(binding_IgG_S1 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 bindin~ Baseline "Post 1s~ 15 15 3.82 1.33e-4 9.33e-4 ***
## 2 bindin~ Baseline "Pre 2nd~ 15 14 3.92 8.79e-5 7.03e-4 ***
## 3 bindin~ Baseline "Post 2n~ 15 15 5.12 3.07e-7 2.76e-6 ****
## 4 bindin~ Baseline "One mon~ 15 15 5.37 8.08e-8 8.08e-7 ****
## 5 bindin~ Post 1s~ "Pre 2nd~ 15 14 0.168 8.67e-1 1.00e+0 ns
## 6 bindin~ Post 1s~ "Post 2n~ 15 15 1.30 1.94e-1 8.85e-1 ns
## 7 bindin~ Post 1s~ "One mon~ 15 15 1.55 1.22e-1 7.34e-1 ns
## 8 bindin~ Pre 2nd~ "Post 2n~ 14 15 1.11 2.68e-1 8.85e-1 ns
## 9 bindin~ Pre 2nd~ "One mon~ 14 15 1.35 1.77e-1 8.85e-1 ns
## 10 bindin~ Post 2n~ "One mon~ 15 15 0.246 8.06e-1 1.00e+0 ns
linePlot(data = subsetData, xData = 'timeCategory', yData = 'binding_IgG_S1', groupby = 'Alias', xLabel = ' ', yLabel = "anti-S1 IgG titer",
title = "anti-S1 IgG titer", colorby = "Prior.COVID.infection.", recentCOVID = T) +
geom_hline(yintercept = 25, linetype = "dashed",alpha=0.3) + annotate("text", x=5,y=15,label = "LOD", color="black", alpha=0.2)+
scale_y_continuous(trans='pseudo_log', limits = c(0,1e7), breaks=c(10^(0:7)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
# ggsave(filename = "./Images/BindingAb_S1_IgG_linePlot_recentCOVID.pdf")
twoSampleBar(data = subset(mergedData, timeCategory == "Post 2nd dose"), xData = "Prior.COVID.infection.", yData = "binding_IgG_S1", fillParam = "Prior.COVID.infection.",
title = "Post 2nd dose", yLabel = "anti-S1 IgG titer", nonparam = T) + coord_cartesian(ylim=c(0e1,1e7),) +
scale_y_continuous(trans='pseudo_log', breaks=c(10^(0:7)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10)) #+ ggrepel::geom_text_repel(aes(label = Label))
## Warning: Removed 3 rows containing missing values (position_quasirandom).
# ggsave(filename = "./Images/BindingAb_S1_IgG_post2ndDose.pdf", width=5)
subsetData <- mergedData[-which(mergedData$timeCategory == "two Weeks"),]
subsetData$timeCategory <- factor(subsetData$timeCategory, levels = c("Baseline", "Post 1st dose", "Pre 2nd dose", "Post 2nd dose", "One month post\n2nd dose"))
linePlot(data = subsetData, xData = 'timeCategory', yData = 'binding_IgA_S1', groupby = 'Alias', xLabel = ' ', yLabel = "anti-S1 IgA titer",
title = "anti-S1 IgA titer", colorby = "Prior.COVID.infection.") +
geom_hline(yintercept = 25, linetype = "dashed",alpha=0.3) + annotate("text", x=5,y=15,label = "LOD", color="black", alpha=0.2)+
# scale_color_manual(name="Prior COVID?",values = c("#FFC26A","#B5B2F1")) +
scale_y_continuous(trans='pseudo_log', limits = c(0,1e6), breaks=c(10^(0:7)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10)) #+
# ggrepel::geom_text_repel(data = subset(mergedData, Alias =="HV-002"), aes(label = Label))
# ggsave(filename = "./Images/BindingAb_S1_IgA_linePlot.pdf")
# bartlett.test(binding_IgA_S1 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
kruskal_test(formula = binding_IgA_S1 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 binding_IgA_S1 103 30.8 4 0.00000334 Kruskal-Wallis
dunn_test(binding_IgA_S1 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 bindin~ Baseline "Post 1s~ 9 10 0.437 6.62e-1 1.00e+0 ns
## 2 bindin~ Baseline "Pre 2nd~ 9 10 3.86 1.11e-4 8.89e-4 ***
## 3 bindin~ Baseline "Post 2n~ 9 6 4.28 1.84e-5 1.84e-4 ***
## 4 bindin~ Baseline "One mon~ 9 1 0.952 3.41e-1 1.00e+0 ns
## 5 bindin~ Post 1s~ "Pre 2nd~ 10 10 3.52 4.28e-4 3.00e-3 **
## 6 bindin~ Post 1s~ "Post 2n~ 10 6 3.98 6.81e-5 6.13e-4 ***
## 7 bindin~ Post 1s~ "One mon~ 10 1 0.765 4.44e-1 1.00e+0 ns
## 8 bindin~ Pre 2nd~ "Post 2n~ 10 6 0.933 3.51e-1 1.00e+0 ns
## 9 bindin~ Pre 2nd~ "One mon~ 10 1 -0.737 4.61e-1 1.00e+0 ns
## 10 bindin~ Post 2n~ "One mon~ 6 1 -1.16 2.46e-1 1.00e+0 ns
bartlett.test(binding_IgA_S1 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
##
## Bartlett test of homogeneity of variances
##
## data: binding_IgA_S1 by timeCategory
## Bartlett's K-squared = 70.408, df = 4, p-value = 1.862e-14
kruskal_test(formula = binding_IgA_S1 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 binding_IgA_S1 74 23.8 4 0.0000875 Kruskal-Wallis
dunn_test(binding_IgA_S1 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 bindin~ Baseline "Post 1s~ 12 9 3.32 8.93e-4 7.15e-3 **
## 2 bindin~ Baseline "Pre 2nd~ 12 10 3.77 1.65e-4 1.48e-3 **
## 3 bindin~ Baseline "Post 2n~ 12 10 4.23 2.36e-5 2.36e-4 ***
## 4 bindin~ Baseline "One mon~ 12 6 2.95 3.13e-3 2.19e-2 *
## 5 bindin~ Post 1s~ "Pre 2nd~ 9 10 0.323 7.47e-1 1.00e+0 ns
## 6 bindin~ Post 1s~ "Post 2n~ 9 10 0.751 4.52e-1 1.00e+0 ns
## 7 bindin~ Post 1s~ "One mon~ 9 6 0.0231 9.82e-1 1.00e+0 ns
## 8 bindin~ Pre 2nd~ "Post 2n~ 10 10 0.440 6.60e-1 1.00e+0 ns
## 9 bindin~ Pre 2nd~ "One mon~ 10 6 -0.264 7.92e-1 1.00e+0 ns
## 10 bindin~ Post 2n~ "One mon~ 10 6 -0.645 5.19e-1 1.00e+0 ns
subsetData <- mergedData[-which(mergedData$timeCategory == "two Weeks"),] ;
# subsetData$timeCategory <- factor(subsetData$timeCategory, levels = c("Baseline", "Post 1st dose", "Pre 2nd dose", "Post 2nd dose"))
linePlot(data = subsetData, xData = 'timeCategory', yData = 'IC50_neutAb_log10', groupby = 'Alias', xLabel = ' ', yLabel = "log10 IC50",
title = "Neutralizing antibodies", colorby = "Prior.COVID.infection.") +
geom_hline(yintercept = 10, linetype = "dashed",alpha=0.3) + annotate("text", x=5,y=15,label = "LOD", color="black", alpha=0.2)+
scale_y_continuous(trans='pseudo_log', limits = c(0,1e5), breaks=c(10^(0:6)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
# ggsave(filename = "./Images/neutAb_linePlot.pdf")
# fit <- aov(IC50_neutAb_log10 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No')); tukey_hsd(fit)
# fit <- aov(IC50_neutAb_log10 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes')); tukey_hsd(fit)
bartlett.test(IC50_neutAb_log10 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
##
## Bartlett test of homogeneity of variances
##
## data: IC50_neutAb_log10 by timeCategory
## Bartlett's K-squared = Inf, df = 4, p-value < 2.2e-16
kruskal_test(formula = IC50_neutAb_log10 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 IC50_neutAb_log10 103 33.8 4 0.000000832 Kruskal-Wallis
dunn_test(IC50_neutAb_log10 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 IC50_n~ Baseline "Post 1s~ 5 10 0.114 9.09e-1 1.00e+0 ns
## 2 IC50_n~ Baseline "Pre 2nd~ 5 10 2.32 2.03e-2 1.02e-1 ns
## 3 IC50_n~ Baseline "Post 2n~ 5 9 3.93 8.51e-5 6.81e-4 ***
## 4 IC50_n~ Baseline "One mon~ 5 8 3.46 5.40e-4 3.78e-3 **
## 5 IC50_n~ Post 1s~ "Pre 2nd~ 10 10 2.70 6.89e-3 4.13e-2 *
## 6 IC50_n~ Post 1s~ "Post 2n~ 10 9 4.63 3.57e-6 3.57e-5 ****
## 7 IC50_n~ Post 1s~ "One mon~ 10 8 4.03 5.64e-5 5.08e-4 ***
## 8 IC50_n~ Pre 2nd~ "Post 2n~ 10 9 2.00 4.50e-2 1.80e-1 ns
## 9 IC50_n~ Pre 2nd~ "One mon~ 10 8 1.48 1.39e-1 4.17e-1 ns
## 10 IC50_n~ Post 2n~ "One mon~ 9 8 -0.451 6.52e-1 1.00e+0 ns
bartlett.test(IC50_neutAb_log10 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
##
## Bartlett test of homogeneity of variances
##
## data: IC50_neutAb_log10 by timeCategory
## Bartlett's K-squared = 52.053, df = 4, p-value = 1.345e-10
kruskal_test(formula = IC50_neutAb_log10 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 1 x 6
## .y. n statistic df p method
## * <chr> <int> <dbl> <int> <dbl> <chr>
## 1 IC50_neutAb_log10 74 21.1 4 0.000296 Kruskal-Wallis
dunn_test(IC50_neutAb_log10 ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 10 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 IC50_n~ Baseline "Post 1s~ 10 10 3.37 7.65e-4 6.88e-3 **
## 2 IC50_n~ Baseline "Pre 2nd~ 10 9 3.33 8.81e-4 6.88e-3 **
## 3 IC50_n~ Baseline "Post 2n~ 10 9 3.36 7.74e-4 6.88e-3 **
## 4 IC50_n~ Baseline "One mon~ 10 8 4.01 6.09e-5 6.09e-4 ***
## 5 IC50_n~ Post 1s~ "Pre 2nd~ 10 9 0.0504 9.60e-1 1.00e+0 ns
## 6 IC50_n~ Post 1s~ "Post 2n~ 10 9 0.0865 9.31e-1 1.00e+0 ns
## 7 IC50_n~ Post 1s~ "One mon~ 10 8 0.836 4.03e-1 1.00e+0 ns
## 8 IC50_n~ Pre 2nd~ "Post 2n~ 9 9 0.0351 9.72e-1 1.00e+0 ns
## 9 IC50_n~ Pre 2nd~ "One mon~ 9 8 0.769 4.42e-1 1.00e+0 ns
## 10 IC50_n~ Post 2n~ "One mon~ 9 8 0.735 4.63e-1 1.00e+0 ns
linePlot(data = subsetData, xData = 'timeCategory', yData = 'IC50_neutAb_log10', groupby = 'Alias', xLabel = ' ', yLabel = "log10 IC50",
title = "Neutralizing antibodies", colorby = "Prior.COVID.infection.", recentCOVID = T) +
geom_hline(yintercept = 10, linetype = "dashed",alpha=0.3) + annotate("text", x=5,y=15,label = "LOD", color="black", alpha=0.2)+
scale_y_continuous(trans='pseudo_log', limits = c(0,1e5), breaks=c(10^(0:6)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
# ggsave(filename = "./Images/neutAb_linePlot_recentCOVID.pdf")
Post 1st dose
# twoSampleBar(data = subset(mergedData, timeCategory == "Post 1st dose"), xData = "Prior.COVID.infection.", yData = "IC50_neutAb_log10", fillParam = "Prior.COVID.infection.",
# title = "Post 1st dose", yLabel = "Neutralizing antibodies", nonparam = T) + coord_cartesian(ylim=c(0e1,1e5),) +
# scale_y_continuous(trans='pseudo_log', breaks=c(10^(0:7)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10)) #+ ggrepel::geom_text_repel(aes(label = Label))
Post 2nd dose
twoSampleBar(data = subset(mergedData, timeCategory == "Post 2nd dose"), xData = "Prior.COVID.infection.", yData = "IC50_neutAb_log10", fillParam = "Prior.COVID.infection.",
title = "Post 2nd dose", yLabel = "Neutralizing antibodies", nonparam = T) + coord_cartesian(ylim=c(0e1,1e5),) +
scale_y_continuous(trans='pseudo_log', breaks=c(10^(0:7)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10)) #+ ggrepel::geom_text_repel(aes(label = Label))
## Warning: Removed 17 rows containing missing values (position_quasirandom).
# ggsave(filename = "./Images/neutAb_post2ndDose.pdf", width=5)
twoSampleBar(data = subset(mergedData, timeCategory == "One month post\n2nd dose"), xData = "Prior.COVID.infection.", yData = "IC50_neutAb_log10", fillParam = "Prior.COVID.infection.",
title = "One month post", yLabel = "Neutralizing antibodies", nonparam = T) + coord_cartesian(ylim=c(0e1,1e5),) +
scale_y_continuous(trans='pseudo_log', breaks=c(10^(0:7)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10)) #+ ggrepel::geom_text_repel(aes(label = Label))
## Warning: Removed 18 rows containing missing values (position_quasirandom).
# ggsave(filename = "./Images/neutAb_oneMonthpost2ndDose.pdf", width=5)
twoSampleBar(data = subset(mergedData, timeCategory == "Baseline"), xData = "Prior.COVID.infection.", yData = "binding_IgG_N", fillParam = "Prior.COVID.infection.",
title = "Baseline", yLabel = "Anti-N IgG titer", nonparam = T) + coord_cartesian(ylim=c(0e1,1e5),) +
scale_y_continuous(trans='pseudo_log', breaks=c(10^(0:7)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10)) #+ ggrepel::geom_text_repel(aes(label = Label))
## Warning: Removed 4 rows containing missing values (position_quasirandom).
# ggsave(filename = "./Images/bindingAb_N_IgG_baseline.pdf", width=5)
linePlot(data = subsetData, xData = 'timeCategory', yData = 'binding_IgG_N', groupby = 'Alias', xLabel = ' ', yLabel = "anti-N IgG titer",
title = "anti-N IgG titer", colorby = "Prior.COVID.infection.") +
# scale_color_manual(name="Prior COVID?",values = c("#FFC26A","#B5B2F1")) + #theme(legend.position = 'none') +
scale_y_continuous(trans='pseudo_log', limits = c(0,1e5), breaks=c(10^(0:6)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10)) #+ ggrepel::geom_text_repel(aes(label = Label))
# ggsave(filename = "./Images/BindingAb_N_IgG_linePlot.pdf", width=7)
linePlot(data = mergedData, xData = 'DPV', yData = 'binding_IgG_S1', groupby = 'Alias', xLabel = 'Days after first vaccine dose', yLabel = "anti-S1 IgG titer",
title = "anti-S1 IgG titer", colorby = "Prior.COVID.infection.") +
# scale_color_manual(name="Prior COVID?",values = c("#FFC26A","#B5B2F1")) +
scale_y_continuous(trans='pseudo_log', limits = c(0,1e7), breaks=c(10^(0:7)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))# + ggrepel::geom_text_repel(aes(label = Label))
# ggsave(filename = "./Images/BindingAb_S1_IgG_linePlot_contTime.pdf", width=7)
univScatter(data = subset(mergedData, Prior.COVID.infection. == "Yes" & timeCategory == "Baseline"), xData = "binding_IgG_S1", yData = 'FC_IgG_S1_postVax1',
fillParam = 'Prior.COVID.infection.',title = "Post 1st dose Anti-S1 IgG", xLabel = "Baseline anti-S1 IgG titer", yLabel = "Fold-change anti-S1 IgG", nonparam = T) +
scale_fill_manual(values=c("#B5B2F1")) +
scale_x_continuous(trans='pseudo_log', limits = c(1e2,5e5), breaks=c(10^(0:7)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10)) +
scale_y_continuous(trans='pseudo_log', limits = c(0,1e5), breaks=c(10^(0:7)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## `geom_smooth()` using formula 'y ~ x'
# ggsave(filename = "./Images/BindingAb_S1_IgG_vs_FC_S1binding.pdf")
subsetData <- subset(mergedData, timeCategory == 'Baseline'); subsetData <- subsetData[which(!is.na(subsetData$binding_IgG_S1)),]
subsetData %>% levene_test( binding_IgG_S1 ~ Prior.COVID.infection.)
## Warning in leveneTest.default(y = y, group = group, ...): group coerced to
## factor.
## # A tibble: 1 x 4
## df1 df2 statistic p
## <int> <int> <dbl> <dbl>
## 1 1 34 14.4 0.000585
subsetData %>% shapiro_test( binding_IgG_S1)
## # A tibble: 1 x 3
## variable statistic p
## <chr> <dbl> <dbl>
## 1 binding_IgG_S1 0.546 0.00000000219
subsetData %>% wilcox_test(binding_IgG_S1 ~ Prior.COVID.infection.)
## # A tibble: 1 x 7
## .y. group1 group2 n1 n2 statistic p
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl>
## 1 binding_IgG_S1 No Yes 21 15 0 0.0000000314
subsetData %>% group_by(Prior.COVID.infection.) %>% get_summary_stats(binding_IgG_S1)
## # A tibble: 2 x 14
## Prior.COVID.inf~ variable n min max median q1 q3 iqr mad
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 No binding~ 21 25 3.95e1 25 25 25 0 0
## 2 Yes binding~ 15 323. 3.21e4 5991. 2350. 10901. 8551. 6271.
## # ... with 4 more variables: mean <dbl>, sd <dbl>, se <dbl>, ci <dbl>
subsetData %>% levene_test( IC50_neutAb_log10 ~ Prior.COVID.infection.)
## Warning in leveneTest.default(y = y, group = group, ...): group coerced to
## factor.
## # A tibble: 1 x 4
## df1 df2 statistic p
## <int> <int> <dbl> <dbl>
## 1 1 13 2.95 0.110
subsetData %>% shapiro_test( IC50_neutAb_log10)
## # A tibble: 1 x 3
## variable statistic p
## <chr> <dbl> <dbl>
## 1 IC50_neutAb_log10 0.629 0.0000481
subsetData %>% wilcox_test(IC50_neutAb_log10 ~ Prior.COVID.infection.)
## # A tibble: 1 x 7
## .y. group1 group2 n1 n2 statistic p
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl>
## 1 IC50_neutAb_log10 No Yes 21 15 5 0.0118
subsetData <- subset(mergedData, timeCategory == 'Post 1st dose'); subsetData <- subsetData[which(!is.na(subsetData$binding_IgG_S1)),]
subsetData %>% group_by(Prior.COVID.infection.) %>% get_summary_stats(IC50_neutAb_log10)
## # A tibble: 2 x 14
## Prior.COVID.inf~ variable n min max median q1 q3 iqr mad
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 No IC50_ne~ 10 10 1.59e1 10 10 10 0 0
## 2 Yes IC50_ne~ 10 39 3.22e4 4084. 2220. 9115. 6894. 4600.
## # ... with 4 more variables: mean <dbl>, sd <dbl>, se <dbl>, ci <dbl>
subsetData %>% levene_test( IC50_neutAb_log10 ~ Prior.COVID.infection.)
## Warning in leveneTest.default(y = y, group = group, ...): group coerced to
## factor.
## # A tibble: 1 x 4
## df1 df2 statistic p
## <int> <int> <dbl> <dbl>
## 1 1 18 5.49 0.0308
subsetData %>% shapiro_test( IC50_neutAb_log10)
## # A tibble: 1 x 3
## variable statistic p
## <chr> <dbl> <dbl>
## 1 IC50_neutAb_log10 0.581 0.00000191
subsetData %>% wilcox_test(IC50_neutAb_log10 ~ Prior.COVID.infection.)
## # A tibble: 1 x 7
## .y. group1 group2 n1 n2 statistic p
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl>
## 1 IC50_neutAb_log10 No Yes 17 15 0 0.0000874
subsetData %>% group_by(Prior.COVID.infection.) %>% get_summary_stats(FC_IgG_S1_postVax1)
## # A tibble: 2 x 14
## Prior.COVID.inf~ variable n min max median q1 q3 iqr mad
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 No FC_IgG_~ 17 0.894 79.1 2.66 1.24 7.75 6.51 2.44
## 2 Yes FC_IgG_~ 15 0.697 868. 92.4 30.7 162. 131. 115.
## # ... with 4 more variables: mean <dbl>, sd <dbl>, se <dbl>, ci <dbl>
subsetData %>% shapiro_test(FC_IgG_S1_postVax1)
## # A tibble: 1 x 3
## variable statistic p
## <chr> <dbl> <dbl>
## 1 FC_IgG_S1_postVax1 0.500 0.00000000257
subsetData %>% wilcox_test(FC_IgG_S1_postVax1 ~ Prior.COVID.infection.)
## # A tibble: 1 x 7
## .y. group1 group2 n1 n2 statistic p
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl>
## 1 FC_IgG_S1_postVax1 No Yes 17 15 41 0.000688
subsetData %>% group_by(Prior.COVID.infection.) %>% get_summary_stats(FC_IgG_S1_postVax2)
## # A tibble: 2 x 14
## Prior.COVID.inf~ variable n min max median q1 q3 iqr mad
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 No FC_IgG_~ 17 1.44 39.5 11.3 5.15 17.9 12.8 9.77
## 2 Yes FC_IgG_~ 14 0.611 28.3 1.29 0.955 1.6 0.645 0.52
## # ... with 4 more variables: mean <dbl>, sd <dbl>, se <dbl>, ci <dbl>
subsetData %>% shapiro_test(FC_IgG_S1_postVax2)
## # A tibble: 1 x 3
## variable statistic p
## <chr> <dbl> <dbl>
## 1 FC_IgG_S1_postVax2 0.758 0.00000940
subsetData %>% wilcox_test(FC_IgG_S1_postVax2 ~ Prior.COVID.infection.)
## # A tibble: 1 x 7
## .y. group1 group2 n1 n2 statistic p
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl>
## 1 FC_IgG_S1_postVax2 No Yes 17 15 216 0.0000329
subsetData <- subset(mergedData, timeCategory == 'Post 2nd dose'); subsetData <- subsetData[which(!is.na(subsetData$binding_IgG_S1)),]
subsetData %>% levene_test( binding_IgG_S1 ~ Prior.COVID.infection.)
## Warning in leveneTest.default(y = y, group = group, ...): group coerced to
## factor.
## # A tibble: 1 x 4
## df1 df2 statistic p
## <int> <int> <dbl> <dbl>
## 1 1 30 0.395 0.535
subsetData %>% shapiro_test( binding_IgG_S1)
## # A tibble: 1 x 3
## variable statistic p
## <chr> <dbl> <dbl>
## 1 binding_IgG_S1 0.602 0.0000000396
subsetData %>% wilcox_test(binding_IgG_S1 ~ Prior.COVID.infection.)
## # A tibble: 1 x 7
## .y. group1 group2 n1 n2 statistic p
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl>
## 1 binding_IgG_S1 No Yes 17 15 77 0.0583
subsetData <- subset(mergedData, timeCategory == 'One month post\n2nd dose'); subsetData <- subsetData[which(!is.na(subsetData$binding_IgG_S1)),]
subsetData %>% levene_test( binding_IgG_S1 ~ Prior.COVID.infection.)
## Warning in leveneTest.default(y = y, group = group, ...): group coerced to
## factor.
## # A tibble: 1 x 4
## df1 df2 statistic p
## <int> <int> <dbl> <dbl>
## 1 1 30 1.86 0.183
subsetData %>% shapiro_test( binding_IgG_S1)
## # A tibble: 1 x 3
## variable statistic p
## <chr> <dbl> <dbl>
## 1 binding_IgG_S1 0.641 0.000000127
subsetData %>% wilcox_test(binding_IgG_S1 ~ Prior.COVID.infection.)
## # A tibble: 1 x 7
## .y. group1 group2 n1 n2 statistic p
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl>
## 1 binding_IgG_S1 No Yes 17 15 55 0.00535
subsetData <- mergedData[which(!is.na(mergedData$FC_Elispot_IgG_S1)),]
subsetData <- subsetData[which(is.finite(subsetData$FC_Elispot_IgG_S1)),]
subsetData %>% group_by(Prior.COVID.infection.) %>% get_summary_stats(FC_Elispot_IgG_S1)
## # A tibble: 2 x 14
## Prior.COVID.inf~ variable n min max median q1 q3 iqr mad
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 No FC_Elis~ 10 2 12.0 7.01 2 12.0 10.0 7.42
## 2 Yes FC_Elis~ 39 0 0.6 0.222 0.015 0.335 0.32 0.295
## # ... with 4 more variables: mean <dbl>, sd <dbl>, se <dbl>, ci <dbl>
—————— Correlational analyses ————————–
bivScatter(data1 = subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 1st dose" & Tube == "HEP"), name1 = "Naive",
data2 = subset(mergedData, Prior.COVID.infection. == 'Yes' & timeCategory == "Post 1st dose" & Tube == "HEP"), name2 = "Experienced",
xData = "FCActivCD4_Vax1", yData = "FCActivCD8_Vax1", fillParam = "Prior.COVID.infection.", title = "Post 1st dose",
xLabel = "Fold-change CD4+Ki67+CD38+", yLabel = "Fold-change CD8+Ki67+CD38+", nonparam = T) +
scale_x_continuous(trans='pseudo_log', breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10)) +
scale_y_continuous(trans='pseudo_log', breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 2 rows containing non-finite values (stat_smooth).
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 2 rows containing non-finite values (stat_smooth).
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 2 rows containing missing values (geom_point).
# ggsave(filename = "./Images/FCActivCD4_correl_FCActivCD8_Vax1.pdf", width=8)
bivScatter(data1 = subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 2nd dose" & Tube == "HEP"), name1 = "Naive",
data2 = subset(mergedData, Prior.COVID.infection. == 'Yes' & timeCategory == "Post 2nd dose" & Tube == "HEP"), name2 = "Experienced",
xData = "FCActivCD4_Vax2", yData = "FCActivCD8_Vax2", fillParam = "Prior.COVID.infection.", title = "Post 2nd dose",
xLabel = "Fold-change CD4+Ki67+CD38+", yLabel = "Fold-change CD8+Ki67+CD38+", nonparam = T) +
scale_x_continuous(trans='pseudo_log', breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10)) +
scale_y_continuous(trans='pseudo_log', limits = c(0,200), breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 1 rows containing non-finite values (stat_smooth).
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 1 rows containing non-finite values (stat_smooth).
## Warning: Removed 1 rows containing missing values (geom_point).
## Warning: Removed 1 rows containing missing values (geom_point).
# ggsave(filename = "./Images/FCActivCD4_correl_FCActivCD8_Vax2.pdf", width=8)
subsetData <- subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 1st dose")
subsetData <- subsetData[,grep("^FCActiv",names(subsetData))]
cor.elispots <- cor(subsetData, method="kendall" , use="pairwise.complete.obs" )
cor.elispots.pmat <- ggcorrplot::cor_pmat(subsetData, method="kendall", use="pairwise.complete.obs" )
ggcorrplot::ggcorrplot(corr = cor.elispots, p.mat = cor.elispots.pmat, title = "Fold-change responses - Naive", legend.title = "Kendall tau", insig = "blank", tl.cex = 20)
# ggsave(filename = "./Images/Fold-changes_ggcorrplot_Naive.pdf")
subsetData <- subset(mergedData, Prior.COVID.infection. == 'Yes' & timeCategory == "Post 1st dose")
subsetData <- subsetData[,grep("^FCActiv",names(subsetData))]
cor.elispots <- cor(subsetData, method="kendall" , use="pairwise.complete.obs" )
cor.elispots.pmat <- ggcorrplot::cor_pmat(subsetData, method="kendall", use="pairwise.complete.obs" )
ggcorrplot::ggcorrplot(corr = cor.elispots, p.mat = cor.elispots.pmat, title = "Fold-change responses - Experienced", legend.title = "Kendall tau", insig = "blank", tl.cex = 20)
# ggsave(filename = "./Images/Fold-changes_ggcorrplot_Experienced.pdf")
bivScatter(data1 = subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 1st dose" & Tube == "HEP"), name1 = "Naive",
data2 = subset(mergedData, Prior.COVID.infection. == 'Yes' & timeCategory == "Post 1st dose" & Tube == "HEP"), name2 = "Experienced",
xData = "Age", yData = "CD4_.CD38.Ki67._FreqParent", fillParam = "Prior.COVID.infection.", title = "Post 1st dose",
xLabel = "Age", yLabel = "Ki67+CD38+ (% CD4)", nonparam = T) +
scale_x_continuous(limits = c(20,70), breaks=seq(0,100,10)) + scale_y_continuous(limits = c(0,5), breaks=seq(0,10,1))
## Warning in cor.test.default(data1[, xData], data1[, yData], method = "kendall"):
## Cannot compute exact p-value with ties
## Warning in cor.test.default(data2[, xData], data2[, yData], method = "kendall"):
## Cannot compute exact p-value with ties
## `geom_smooth()` using formula 'y ~ x'
## `geom_smooth()` using formula 'y ~ x'
# ggsave(filename = "./Images/ActivCD4_correl_Age_Vax1.pdf", width=8)
bivScatter(data1 = subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 2nd dose" & Tube == "HEP"), name1 = "Naive",
data2 = subset(mergedData, Prior.COVID.infection. == 'Yes' & timeCategory == "Post 2nd dose" & Tube == "HEP"), name2 = "Experienced",
xData = "Age", yData = "CD4_.CD38.Ki67._FreqParent", fillParam = "Prior.COVID.infection.", title = "Post 2nd dose",
xLabel = "Age", yLabel = "Ki67+CD38+ (% CD4)", nonparam = T) +
scale_x_continuous(limits = c(20,70), breaks=seq(0,100,10)) + scale_y_continuous(limits = c(0,5), breaks=seq(0,10,1))
## Warning in cor.test.default(data1[, xData], data1[, yData], method = "kendall"):
## Cannot compute exact p-value with ties
## Warning in cor.test.default(data1[, xData], data1[, yData], method = "kendall"):
## Cannot compute exact p-value with ties
## `geom_smooth()` using formula 'y ~ x'
## `geom_smooth()` using formula 'y ~ x'
# ggsave(filename = "./Images/ActivCD4_correl_Age_Vax2.pdf", width=8)
bivScatter(data1 = subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 1st dose" & Tube == "HEP"), name1 = "Naive",
data2 = subset(mergedData, Prior.COVID.infection. == 'Yes' & timeCategory == "Post 1st dose" & Tube == "HEP"), name2 = "Experienced",
xData = "Age", yData = "CD8_.CD38.Ki67._FreqParent", fillParam = "Prior.COVID.infection.", title = "Post 1st dose",
xLabel = "Age", yLabel = "Ki67+CD38+ (% CD8)", nonparam = T) +
scale_x_continuous(limits = c(20,70), breaks=seq(0,100,10)) + scale_y_continuous(limits = c(0,5), breaks=seq(0,10,1))
## Warning in cor.test.default(data1[, xData], data1[, yData], method = "kendall"):
## Cannot compute exact p-value with ties
## Warning in cor.test.default(data1[, xData], data1[, yData], method = "kendall"):
## Cannot compute exact p-value with ties
## `geom_smooth()` using formula 'y ~ x'
## `geom_smooth()` using formula 'y ~ x'
# ggsave(filename = "./Images/ActivCD8_correl_Age_Vax1.pdf", width=8)
bivScatter(data1 = subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 2nd dose" & Tube == "HEP"), name1 = "Naive",
data2 = subset(mergedData, Prior.COVID.infection. == 'Yes' & timeCategory == "Post 2nd dose" & Tube == "HEP"), name2 = "Experienced",
xData = "Age", yData = "CD8_.CD38.Ki67._FreqParent", fillParam = "Prior.COVID.infection.", title = "Post 2nd dose",
xLabel = "Age", yLabel = "Ki67+CD38+ (% CD8)", nonparam = T) +
scale_x_continuous(limits = c(20,70), breaks=seq(0,100,10)) + scale_y_continuous(limits = c(0,5), breaks=seq(0,10,1))
## Warning in cor.test.default(data1[, xData], data1[, yData], method = "kendall"):
## Cannot compute exact p-value with ties
## Warning in cor.test.default(data1[, xData], data1[, yData], method = "kendall"):
## Cannot compute exact p-value with ties
## `geom_smooth()` using formula 'y ~ x'
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 1 rows containing non-finite values (stat_smooth).
## Warning: Removed 1 rows containing missing values (geom_point).
# ggsave(filename = "./Images/ActivCD8_correl_Age_Vax2.pdf", width=8)
#———————————— Age correlations with activated CD4 responses ——————————————
subsetData <- subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 1st dose")
subsetData <- subsetData[,grep( paste(c("CD8_.CD38.Ki67._FreqParent","CD4_.CD38.Ki67._FreqParent","Age"), collapse = "|"), names(subsetData))] # "^FCActivCD4",
cor.matrix <- cor(subsetData, method="kendall" , use="pairwise.complete.obs" )
cor.matrix.pmat <- ggcorrplot::cor_pmat(subsetData, method="kendall", use="pairwise.complete.obs" )
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
cor.matrix <- as.data.frame(cor.matrix); cor.matrix$Labels <- row.names(cor.matrix); cor.matrix$Prior.COVID <- "No"
cor.matrix <- merge( x = cor.matrix, y = cor.matrix.pmat[,"Age"], by = "row.names"); names(cor.matrix)[grep("y",names(cor.matrix))] <- "Pvalue"
subsetData <- subset(mergedData, Prior.COVID.infection. == 'Yes' & timeCategory == "Post 1st dose")
subsetData <- subsetData[,grep( paste(c("CD8_.CD38.Ki67._FreqParent","CD4_.CD38.Ki67._FreqParent","Age" ), collapse = "|"), names(subsetData))] #"^FCActivCD4",
cor.matrix2 <- cor(subsetData, method="kendall" , use="pairwise.complete.obs" )
cor.matrix2.pmat <- ggcorrplot::cor_pmat(subsetData, method="kendall", use="pairwise.complete.obs" )
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
cor.matrix2 <- as.data.frame(cor.matrix2); cor.matrix2$Labels <- row.names(cor.matrix2); cor.matrix2$Prior.COVID <- "Yes"
cor.matrix2 <- merge( x = cor.matrix2, y = cor.matrix2.pmat[,"Age"], by = "row.names"); names(cor.matrix2)[grep("y",names(cor.matrix2))] <- "Pvalue"
temp <- as.data.frame(rbind(cor.matrix, cor.matrix2)); temp <- temp[ -grep( paste( c("Age"), collapse = "|"), temp$Row.names),]
#
# ggplot( data = temp, aes(y = Labels,x = Age, fill = Prior.COVID)) + geom_bar(stat='identity',position = 'dodge',width=0.75) + theme_bw() +
# scale_fill_manual(values=c("#FFDFB1", "#B5B2F1")) + xlab("Correlation with Age") + ylab(" ") + theme(axis.text.y = element_text(angle=0, size = 10)) +
# ggtitle("Post 1st dose") + geom_vline(xintercept=0, linetype = "dashed") + scale_x_continuous(limits = c(-1,1))
#
subsetData <- subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 2nd dose")
subsetData <- subsetData[,grep( paste(c("CD8_.CD38.Ki67._FreqParent","CD4_.CD38.Ki67._FreqParent","Age" ), collapse = "|"), names(subsetData))]
cor.matrix <- cor(subsetData, method="kendall" , use="pairwise.complete.obs" )
cor.matrix.pmat <- ggcorrplot::cor_pmat(subsetData, method="kendall", use="pairwise.complete.obs" )
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
cor.matrix <- as.data.frame(cor.matrix); cor.matrix$Labels <- row.names(cor.matrix); cor.matrix$Prior.COVID <- "No"
cor.matrix <- merge( x = cor.matrix, y = cor.matrix.pmat[,"Age"], by = "row.names"); names(cor.matrix)[grep("y",names(cor.matrix))] <- "Pvalue"
subsetData <- subset(mergedData, Prior.COVID.infection. == 'Yes' & timeCategory == "Post 2nd dose")
subsetData <- subsetData[,grep( paste(c("CD8_.CD38.Ki67._FreqParent","CD4_.CD38.Ki67._FreqParent","Age" ), collapse = "|"), names(subsetData))]
cor.matrix2 <- cor(subsetData, method="kendall" , use="pairwise.complete.obs" )
cor.matrix2.pmat <- ggcorrplot::cor_pmat(subsetData, method="kendall", use="pairwise.complete.obs" )
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
cor.matrix2 <- as.data.frame(cor.matrix2); cor.matrix2$Labels <- row.names(cor.matrix2); cor.matrix2$Prior.COVID <- "Yes"
cor.matrix2 <- merge( x = cor.matrix2, y = cor.matrix2.pmat[,"Age"], by = "row.names"); names(cor.matrix2)[grep("y",names(cor.matrix2))] <- "Pvalue"
temp2 <- as.data.frame(rbind(cor.matrix, cor.matrix2)); temp2 <- temp2[ -grep( paste( c("Age"), collapse = "|"), temp2$Row.names),]
# temp[ grep("CD4_.CD38.Ki67._FreqParent", temp$Row.names), "Labels"] <- "Frequency\npost 1st dose"
temp[,"Labels"] <- "Frequency\npost 1st dose"; temp2[,"Labels"] <- "Frequency\npost 2nd dose"
# temp2[ grep("CD4_.CD38.Ki67._FreqParent", temp2$Row.names), "Labels"] <- "Frequency\npost 2nd dose"
# temp[ grep("FCActivCD4_Vax1",temp$Row.names), "Labels"] <- "Fold-change\npost 1st dose"
# temp[ grep("FCActivCD4_Vax2",temp$Row.names), "Labels"] <- "Fold-change\npost 2nd dose"
temp <- temp[,c("Row.names","Age","Labels","Prior.COVID","Pvalue")]; temp2 <- temp2[,c("Row.names", "Age","Labels","Prior.COVID","Pvalue")]
temp <- as.data.frame(rbind(temp, temp2))
temp$Labels <- factor(temp$Labels, levels = c("Fold-change\npost 2nd dose", "Fold-change\npost 1st dose","Frequency\npost 2nd dose", "Frequency\npost 1st dose"))
# temp <- temp[c(1:6,8,7),] # rearrange last two rows; needed if FC lines are included in the df
a <- ggplot( data = subset(temp, Row.names == "CD4_.CD38.Ki67._FreqParent"), aes(x = Labels,y = Age, fill = Prior.COVID)) + geom_bar(stat='identity',position = position_dodge(width=0.5), width=0.05, color="black", size=0.1) +
geom_point(aes(fill=Prior.COVID, size=Pvalue), pch=21, color="black", stroke=0.2, position = position_dodge(width=0.5)) +
theme_bw() + scale_size(range = c(18,1), breaks = c(0,0.05,0.1,0.2,0.7), limits = c(0,0.8), trans = 'pseudo_log') + guides(size = guide_legend(reverse=TRUE)) +
scale_fill_manual(values=c("#FFC26A", "#B5B2F1")) + ylab("Kendall's tau vs Age") + xlab(" ") + ggtitle("CD4+Ki67+CD38+") + geom_hline(yintercept=0, linetype = "dashed") +
theme(axis.text.y = element_text(size = 20, color="black"), plot.title = element_text(size=20), axis.text.x = element_text(size=20, color="black", angle=45, hjust=1,vjust=1),
axis.title.x = element_text(size=20, color="black")) +
coord_flip() + scale_y_continuous(limits = c(-1,0.5), breaks = seq(-1,1,0.25))
a
# ggsave(filename = "./Images/Age_CD4correlations_lollipop.pdf", width=5, height = 5)
b <- ggplot( data = subset(temp, Row.names == "CD8_.CD38.Ki67._FreqParent"), aes(x = Labels,y = Age, fill = Prior.COVID)) + geom_bar(stat='identity',position = position_dodge(width=0.5), width=0.05, color="black", size=0.1) +
geom_point(aes(fill=Prior.COVID, size=Pvalue), pch=21, color="black", stroke=0.2, position = position_dodge(width=0.5)) +
theme_bw() + scale_size(range = c(18,1), breaks = c(0,0.05,0.1,0.2,0.7), limits = c(0,0.8), trans = 'pseudo_log') + guides(size = guide_legend(reverse=TRUE)) +
scale_fill_manual(values=c("#FFC26A", "#B5B2F1")) + ylab("Kendall's tau vs Age") + xlab(" ") + ggtitle("CD8+Ki67+CD38+") + geom_hline(yintercept=0, linetype = "dashed") +
theme(axis.text.y = element_text(size = 20, color="black"), plot.title = element_text(size=20), axis.text.x = element_text(size=20, color="black", angle=45, hjust=1,vjust=1),
axis.title.x = element_text(size=20, color="black"), legend.text = element_text(size=20), legend.title = element_text(size=20)) +
coord_flip() + scale_y_continuous(limits = c(-1,0.5), breaks = seq(-1,1,0.25))
b
## Warning: Removed 1 rows containing missing values (geom_point).
# ggsave(filename = "./Images/Age_CD8correlations_lollipop.pdf", width=5, height = 5)
a <- a + theme(legend.position = "none"); b <- b+theme(axis.text.y = element_blank())
grid.arrange(a,b, nrow=1, widths = c(1,1.1))
## Warning: Removed 1 rows containing missing values (geom_point).
# ggsave( plot = arrangeGrob(a,b, nrow=1, widths = c(1,1)), filename = "./Images/Age_Tcellcorrelations_lollipop.pdf", width=9, height=6)
subsetData <- subset(mergedData, !is.na(mergedData$CXCL13))
subsetData %>% group_by( timeCategory) %>% get_summary_stats(CXCL13, type = "common") %>% print(n=500)
## # A tibble: 4 x 11
## timeCategory variable n min max median iqr mean sd se ci
## <fct> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Baseline CXCL13 18 8.34 54.1 24.4 11.2 24.6 12.2 2.88 6.07
## 2 Post 1st dose CXCL13 18 8.74 45.1 22.4 10.1 23.4 9.23 2.18 4.59
## 3 Pre 2nd dose CXCL13 18 11.6 39.5 23.6 7.42 24.0 7.18 1.69 3.57
## 4 Post 2nd dose CXCL13 18 12.5 63.7 24.0 13.8 25.7 12.0 2.84 5.99
linePlot(data = mergedData, xData = 'timeCategory', yData = 'CXCL13', groupby = 'Alias', xLabel = ' ', yLabel = "CXCL13 (pg/mL)",
title = "Plasma CXCL13", colorby = "Prior.COVID.infection.") + theme(axis.title.x = element_blank()) +
scale_color_manual(name="Prior COVID?",values = c("#FFC26A","#B5B2F1")) +
scale_y_continuous(limits = c(0,140),breaks=seq(0,140,10))
## Scale for 'colour' is already present. Adding another scale for 'colour',
## which will replace the existing scale.
# scale_y_continuous(trans='pseudo_log', limits = c(0,1e4), breaks=c(10^(0:7)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))# + ggrepel::geom_text_repel(aes(label = Label))
# ggsave(filename = "./Images/CXCL13plasma_linePlot.pdf")
xData = "timeCategory"; yData = "CXCL13"; fillParam = "Prior.COVID.infection."; groupby = "Prior.COVID.infection."; title = "CXCL13 as medians"; yLabel = "CXCL13 (pg/mL)"; xLabel = " "
subsetData <- subsetData[order(subsetData$Record.ID, subsetData$shortForm, decreasing = F),]
subsetData.median <- subsetData %>% group_by_('timeCategory', fillParam ) %>% summarize(median = median(.data[[yData]], na.rm=T))
## `summarise()` regrouping output by 'timeCategory' (override with `.groups` argument)
# colors: COVID-exp B5B2F1 (purple) COVID-naive FFC26A (orange)
ggplot(data=subsetData, aes_string(x=xData, y=yData, fill=fillParam) ) + theme_bw() +
geom_path(aes_string(group=groupby, color=fillParam), alpha=0.4) +
geom_point(size = 2, pch=21, color="black", alpha=0.2) + facet_wrap(fillParam ) + # , scales='free'
scale_color_manual(values=c("#FFC26A", "#B5B2F1")) +
scale_fill_manual(values=c("#FFC26A", "#B5B2F1")) +
geom_line(data = subsetData.median, aes_string(x = 'timeCategory', y='median', group='1', color=fillParam), alpha=1,size=2) +
geom_point(data = subsetData.median, aes_string(x = 'timeCategory', y='median'), alpha=1,size=2) +
ggtitle(title) + ylab(yLabel) + xlab(xLabel) +
theme(axis.text = element_text(size=18,hjust = 0.5, color="black"), axis.title = element_text(size=22,hjust = 0.5),
plot.title = element_text(size=36,hjust = 0.5), axis.text.x = element_text(angle=45, hjust=1,vjust=1),
legend.position = "none", strip.text = element_text(size = 24, color="black"), strip.background = element_rect(fill="white"))
acuteCOVID <- read.csv(file = "D:/COVID/Infection/Analysis/Rscripts/COVIDmergedData.csv")
acuteCOVID$dummy <- "Acute COVID "
# acuteCOVID.cxcl13 <- acuteCOVID[which(!is.na(acuteCOVID$CXCL13..pg.mL.)),]
# t(acuteCOVID.cxcl13$Subject %in% mergedData$Alias)
# acuteCOVID.cxcl13[c(7,20),c("Subject")] # too few of the acute covid samples' cxcl13 overlap with the vaccinated cxcl13
ggplot(data = subset(acuteCOVID, DPO<30), aes(x = dummy , y = CXCL13..pg.mL.)) + ggbeeswarm::geom_quasirandom( alpha=0.4, color="black", size=3) +
ggtitle("COVID-19") + ylab("Plasma CXCL13 (pg/mL)") + theme_bw() +
theme(axis.text = element_text(color="black",size=18), axis.title = element_text(size=24), axis.text.x = element_text(angle=45, hjust=1,vjust=1),
plot.title=element_text(size=28), axis.title.x = element_blank()) +
scale_y_continuous(breaks = seq(0,150,10), limits = c(0,140))
## Warning: Removed 11 rows containing missing values (position_quasirandom).
# ggsave( filename = "./Images/CXCL13plasma_acuteCOVID.pdf", width=3)
twoSampleBar(data = subset(mergedData, timeCategory == "Post 1st dose"), xData = "Prior.COVID.infection.", yData = "CXCL13", fillParam = "Prior.COVID.infection.",
title = "CXCL13 after 1st dose", yLabel = "CXCL13 (pg/mL)", batch="none", position = "left", FCplot=F, confInt=F, nonparam=T)
## Warning: Removed 18 rows containing missing values (position_quasirandom).
twoSampleBar(data = subset(mergedData, timeCategory == "Post 2nd dose"), xData = "Prior.COVID.infection.", yData = "CXCL13", fillParam = "Prior.COVID.infection.",
title = "CXCL13 after 2nd dose", yLabel = "CXCL13 (pg/mL)", batch="none", position = "left", FCplot=F, confInt=F, nonparam=T)
## Warning: Removed 17 rows containing missing values (position_quasirandom).
#—————— Avidity analyses ————————–
subsetData <- subset(mergedData, timeCategory != "two Weeks" & timeCategory != "2 wks post 2nd dose");
subsetData$timeCategory <- factor(subsetData$timeCategory, levels = c("Baseline", "Post 1st dose", "Pre 2nd dose", "Post 2nd dose","One month post\n2nd dose"))
a<- linePlot(data = subsetData, xData = 'timeCategory', yData = 'Avidity', groupby = 'Alias', xLabel = " ", yLabel = "IgG avidity (%)",
title = "anti-S1 Avidity", colorby = "Prior.COVID.infection.") + theme(axis.title.x = element_blank()) +
scale_color_manual(name="Prior COVID?",values = c("#FFC26A","#B5B2F1")) + scale_y_continuous(limits = c(0,110),breaks=seq(0,140,10)) #+
## Scale for 'colour' is already present. Adding another scale for 'colour',
## which will replace the existing scale.
# ggrepel::geom_text_repel(data = subset(subsetData, Alias =="HV-002"), aes(label = Label))
a
# ggsave(filename = "./Images/avidity_lineplot.pdf")
# plotly::ggplotly(a)
bartlett.test(Avidity ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
##
## Bartlett test of homogeneity of variances
##
## data: Avidity by timeCategory
## Bartlett's K-squared = 0.12491, df = 2, p-value = 0.9395
tukey_hsd( aov(Avidity ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No')) )
## # A tibble: 3 x 9
## term group1 group2 null.value estimate conf.low conf.high p.adj
## * <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 time~ Pre 2~ "Post~ 0 14.9 -9.94 39.7 0.287
## 2 time~ Pre 2~ "One ~ 0 23.5 6.91 40.0 0.00647
## 3 time~ Post ~ "One ~ 0 8.57 -16.2 33.4 0.643
## # ... with 1 more variable: p.adj.signif <chr>
# dunn_test(Avidity ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'No'))
bartlett.test(Avidity ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
##
## Bartlett test of homogeneity of variances
##
## data: Avidity by timeCategory
## Bartlett's K-squared = 17.508, df = 2, p-value = 0.0001578
dunn_test(Avidity ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes'))
## # A tibble: 3 x 9
## .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 Avidi~ Baseline "Pre 2nd dose" 6 6 -0.216 0.829 0.829 ns
## 2 Avidi~ Baseline "One month po~ 6 6 -1.57 0.117 0.351 ns
## 3 Avidi~ Pre 2nd ~ "One month po~ 6 6 -1.35 0.176 0.353 ns
# tukey_hsd( aov(Avidity ~ timeCategory, data=subset(subsetData, Prior.COVID.infection. == 'Yes')) )
linePlot(data = subsetData, xData = 'timeCategory', yData = 'Avidity', groupby = 'Alias', xLabel = ' ', yLabel = "IgG avidity (%)",
title = "anti-S1 Avidity", colorby = "Prior.COVID.infection.", recentCOVID = T) + theme(axis.title.x = element_blank()) +
scale_color_manual(name="Prior COVID?",values = c("grey60","grey60")) + scale_y_continuous(limits = c(0,110),breaks=seq(0,140,10))
## Scale for 'colour' is already present. Adding another scale for 'colour',
## which will replace the existing scale.
# ggsave(filename = "./Images/avidity_lineplot_recentCOVID.pdf")
—————— Correlational analyses ————————–
# index <- grep(paste(c("^Prior","DPO.covid","DPV","timeCategory", "FreqParent$", "^FC"), collapse = "|"), names(mergedData), value=F)
# mergedData.deident <- mergedData[, index]
# subsetData <- mergedData.deident[which(mergedData.deident$timeCategory=="Post 1st dose"), ]
# GGally::ggduo( data = subsetData, mapping=ggplot2::aes(color=Prior.COVID.infection.))+ theme_bw() + ggplot2::theme(legend.position = "bottom") + scale_color_manual(values=c("#FFDFB1", "#B5B2F1")) +
# scale_fill_manual(values=c("#FFDFB1", "#B5B2F1"))
# # ggsave("./Images/exploratory_post1st.pdf", width=50, height=50, limitsize = F)
#
# subsetData <- mergedData.deident[which(mergedData.deident$timeCategory=="Post 2nd dose"), ]
# GGally::ggduo( data = subsetData, mapping=ggplot2::aes(color=Prior.COVID.infection.))+ theme_bw() + ggplot2::theme(legend.position = "bottom") + scale_color_manual(values=c("#FFDFB1", "#B5B2F1")) +
# scale_fill_manual(values=c("#FFDFB1", "#B5B2F1"))
# # ggsave("./Images/exploratory_post2nd.pdf", width=50, height=50, limitsize = F)
ggplot(data = subset(mergedData, timeCategory == "Post 1st dose"), aes(x = Elispot_IgM_RBD, y=CD19_.CD27..CD38._FreqParent, color=Prior.COVID.infection. )) + geom_point(size=5) + theme_bw()
## Warning: Removed 15 rows containing missing values (geom_point).
ggplot(data = subset(mergedData, timeCategory == "Post 1st dose"), aes(x = Elispot_IgG_S1, y=FCActivCD4_Vax1, color=Prior.COVID.infection. )) + geom_point(size=5) + theme_bw()
## Warning: Removed 16 rows containing missing values (geom_point).
———————————— Age correlations with Tfh responses ——————————————
subsetData <- subset(mergedData, timeCategory == "Post 1st dose")
subsetData <- subsetData[,grep( paste(c("^FC"), collapse = "|"), names(subsetData))]
cor.matrix <- round(cor(subsetData, method="kendall",use="pairwise.complete.obs"), 2)
bivScatter(data1 = subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 1st dose" ), name1 = "Naive",
data2 = subset(mergedData, Prior.COVID.infection. == 'Yes' & timeCategory == "Post 1st dose"), name2 = "Experienced",
xData = "FC_IgG_S1_postVax1", yData = "FCtfh_CXCR3_Vax1", fillParam = "Prior.COVID.infection.", title = "Post 1st dose",
xLabel = "Fold-change CD4+Ki67+CD38+", yLabel = "Fold-change ICOS+CD38+ cTfh", nonparam = T) +
scale_x_continuous(trans='pseudo_log', breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10)) +
scale_y_continuous(trans='pseudo_log', breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 7 rows containing non-finite values (stat_smooth).
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 3 rows containing non-finite values (stat_smooth).
## Warning: Removed 6 rows containing missing values (geom_point).
## Warning: Removed 3 rows containing missing values (geom_point).
subsetData <- subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 1st dose")
subsetData <- subsetData[,grep( paste(c("CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqParent","^FCtfh","Age" ), collapse = "|"), names(subsetData))]
cor.matrix <- cor(subsetData, method="kendall" , use="pairwise.complete.obs" )
cor.matrix.pmat <- ggcorrplot::cor_pmat(subsetData, method="kendall", use="pairwise.complete.obs" )
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
cor.matrix <- as.data.frame(cor.matrix); cor.matrix$Labels <- row.names(cor.matrix); cor.matrix$Prior.COVID <- "No"
cor.matrix <- merge( x = cor.matrix, y = cor.matrix.pmat[,"Age"], by = "row.names"); names(cor.matrix)[grep("y",names(cor.matrix))] <- "Pvalue"
subsetData <- subset(mergedData, Prior.COVID.infection. == 'Yes' & timeCategory == "Post 1st dose")
subsetData <- subsetData[,grep( paste(c("CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqParent","^FCtfh","Age" ), collapse = "|"), names(subsetData))]
cor.matrix2 <- cor(subsetData, method="kendall" , use="pairwise.complete.obs" )
cor.matrix2.pmat <- ggcorrplot::cor_pmat(subsetData, method="kendall", use="pairwise.complete.obs" )
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
cor.matrix2 <- as.data.frame(cor.matrix2); cor.matrix2$Labels <- row.names(cor.matrix2); cor.matrix2$Prior.COVID <- "Yes"
cor.matrix2 <- merge( x = cor.matrix2, y = cor.matrix2.pmat[,"Age"], by = "row.names"); names(cor.matrix2)[grep("y",names(cor.matrix2))] <- "Pvalue"
temp <- as.data.frame(rbind(cor.matrix, cor.matrix2)); temp <- temp[ -grep( paste( c("Age", "Foxp3", "CXCR3"), collapse = "|"), temp$Row.names),]
#
# ggplot( data = temp, aes(y = Labels,x = Age, fill = Prior.COVID)) + geom_bar(stat='identity',position = 'dodge',width=0.75) + theme_bw() +
# scale_fill_manual(values=c("#FFDFB1", "#B5B2F1")) + xlab("Correlation with Age") + ylab(" ") + theme(axis.text.y = element_text(angle=0, size = 10)) +
# ggtitle("Post 1st dose") + geom_vline(xintercept=0, linetype = "dashed") + scale_x_continuous(limits = c(-1,1))
#
subsetData <- subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 2nd dose")
subsetData <- subsetData[,grep( paste(c("CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqParent","Age" ), collapse = "|"), names(subsetData))]
cor.matrix <- cor(subsetData, method="kendall" , use="pairwise.complete.obs" )
cor.matrix.pmat <- ggcorrplot::cor_pmat(subsetData, method="kendall", use="pairwise.complete.obs" )
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
cor.matrix <- as.data.frame(cor.matrix); cor.matrix$Labels <- row.names(cor.matrix); cor.matrix$Prior.COVID <- "No"
cor.matrix <- merge( x = cor.matrix, y = cor.matrix.pmat[,"Age"], by = "row.names"); names(cor.matrix)[grep("y",names(cor.matrix))] <- "Pvalue"
subsetData <- subset(mergedData, Prior.COVID.infection. == 'Yes' & timeCategory == "Post 2nd dose")
subsetData <- subsetData[,grep( paste(c("CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqParent","Age" ), collapse = "|"), names(subsetData))]
cor.matrix2 <- cor(subsetData, method="kendall" , use="pairwise.complete.obs" )
cor.matrix2.pmat <- ggcorrplot::cor_pmat(subsetData, method="kendall", use="pairwise.complete.obs" )
## Warning in cor.test.default(mat[, i], mat[, j], ...): Cannot compute exact p-
## value with ties
cor.matrix2 <- as.data.frame(cor.matrix2); cor.matrix2$Labels <- row.names(cor.matrix2); cor.matrix2$Prior.COVID <- "Yes"
cor.matrix2 <- merge( x = cor.matrix2, y = cor.matrix2.pmat[,"Age"], by = "row.names"); names(cor.matrix2)[grep("y",names(cor.matrix2))] <- "Pvalue"
temp2 <- as.data.frame(rbind(cor.matrix, cor.matrix2)); temp2 <- temp2[ -grep( paste( c("Age", "Foxp3", "CXCR3"), collapse = "|"), temp2$Row.names),]
#
# ggplot( data = temp2, aes(y = Labels,x = Age, fill = Prior.COVID)) + geom_bar(stat='identity',position = 'dodge',width=0.75) + theme_bw() +
# scale_fill_manual(values=c("#FFDFB1", "#B5B2F1")) + xlab("Correlation with Age") + ylab(" ") + theme(axis.text.y = element_text(angle=0, size = 10)) +
# ggtitle("Post 2nd dose") + geom_vline(xintercept=0, linetype = "dashed") + scale_x_continuous(limits = c(-1,1))
# temp <- x; temp2 <- y
temp[ grep("CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqParent", temp$Row.names), "Labels"] <- "Frequency\npost 1st dose"
temp2[ grep("CD4_.Nonnaive.cTfh.ICOS..CD38.._FreqParent", temp2$Row.names), "Labels"] <- "Frequency\npost 2nd dose"
temp[ grep("FCtfh_Vax1",temp$Row.names), "Labels"] <- "Fold-change\npost 1st dose"
temp[ grep("FCtfh_Vax2",temp$Row.names), "Labels"] <- "Fold-change\npost 2nd dose"
temp <- temp[,c("Row.names","Age","Labels","Prior.COVID","Pvalue")]; temp2 <- temp2[,c("Row.names", "Age","Labels","Prior.COVID","Pvalue")]
temp <- as.data.frame(rbind(temp, temp2))
temp$Labels <- factor(temp$Labels, levels = c("Fold-change\npost 2nd dose", "Fold-change\npost 1st dose","Frequency\npost 2nd dose", "Frequency\npost 1st dose"))
# temp <- temp[c(1:6,8,7),]
ggplot( data = temp, aes(x = Labels,y = Age, fill = Prior.COVID)) + geom_bar(stat='identity',position = position_dodge(width=0.5), width=0.05, color="black", size=0.1) +
geom_point(aes(fill=Prior.COVID, size=Pvalue), pch=21, color="black", stroke=0.2, position = position_dodge(width=0.5)) +
theme_bw() + scale_size(range = c(8,1), breaks = c(0,0.05,0.1,0.2,0.7), limits = c(0,0.8), trans = 'pseudo_log') + guides(size = guide_legend(reverse=TRUE)) +
scale_fill_manual(values=c("#FFC26A", "#B5B2F1")) + ylab("Kendall's tau vs Age") + xlab(" ") + ggtitle("ICOS+CD38+ cTfh") + geom_hline(yintercept=0, linetype = "dashed") +
theme(axis.text.y = element_text(size = 16, color="black"), plot.title = element_text(size=24), axis.text.x = element_text(size=16, color="black", angle=45, hjust=1,vjust=1),
axis.title.x = element_text(size=16, color="black")) +
coord_flip() + scale_y_continuous(limits = c(-1,0.5), breaks = seq(-1,1,0.25))
# ggsave(filename = "./Images/Age_Tfhcorrelations_lollipop.pdf", width=5, height = 5)
bivScatter(data1 = subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 1st dose" ), name1 = "Naive",
data2 = subset(mergedData, Prior.COVID.infection. == 'Yes' & timeCategory == "Post 1st dose"), name2 = "Experienced",
xData = "FCActivCD4_Vax1", yData = "FCtfh_Vax1", fillParam = "Prior.COVID.infection.", title = "Post 1st dose",
xLabel = "Fold-change CD4+Ki67+CD38+", yLabel = "Fold-change ICOS+CD38+ cTfh", nonparam = T) +
scale_x_continuous(trans='pseudo_log', breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10)) +
scale_y_continuous(trans='pseudo_log', breaks=c(10^(0:4)), limits = c(0,20), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 2 rows containing non-finite values (stat_smooth).
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 3 rows containing non-finite values (stat_smooth).
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 3 rows containing missing values (geom_point).
# ggsave(filename = "./Images/FCTfh_correl_FCactivCD4_Vax1.pdf", width=8)
bivScatter(data1 = subset(mergedData, Prior.COVID.infection. == 'No' & timeCategory == "Post 1st dose"), name1 = "Naive",
data2 = subset(mergedData, Prior.COVID.infection. == 'Yes' & timeCategory == "Post 1st dose"), name2 = "Experienced",
xData = "FCActivCD4_Vax2", yData = "FCtfh_Vax2", fillParam = "Prior.COVID.infection.", title = "Post 2nd dose",
xLabel = "Fold-change CD4+Ki67+CD38+", yLabel = "Fold-change ICOS+CD38+ cTfh", nonparam = T) +
scale_x_continuous(trans='pseudo_log', breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10)) +
scale_y_continuous(trans='pseudo_log', breaks=c(10^(0:4)), labels=trans_format('log10',math_format(10^.x)), minor_breaks =5*10^(0:10))
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 2 rows containing non-finite values (stat_smooth).
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 2 rows containing non-finite values (stat_smooth).
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 2 rows containing missing values (geom_point).
# ggsave(filename = "./Images/FCTfh_correl_FCactivCD4_Vax2.pdf", width=8)